2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-09 13:10:27 +00:00
steffen-dotfiles/snippets/php.json

33 lines
768 B
JSON
Raw Normal View History

2021-12-05 10:25:22 +00:00
{
"simple-debugging": {
"prefix": ["cl", "bug"],
"body": "echo '<pre>' . var_dump(\\$${0:var}) . '</pre>';",
"description": "Simple debugging with var_dump()"
},
"echo-val": {
"prefix": "==",
"body": "<?= \\$${0:somevar} ?>",
"description": "PHP {{ }}-echo placeholder"
},
"if-else": {
"prefix": "if2",
"body": [
"<?php if (${1:condition}): ?>",
"\t${2}",
"<?php else: ?>",
"\t${0}",
"<?php endif ?>"
],
"description": "<?php if-else construct ?>"
},
"for-each": {
"prefix": "fe2",
"body": [
"<?php foreach (\\$${1:variable} as \\$${2:key} => \\$${3:value}): ?>",
"\t${0}",
"<?php endforeach ?>"
],
"description": "<?php for-each construct ?>"
}
}