Cheatography
https://cheatography.com
Php code templates for NetBeans
Php generics
cls |
class ${ClassName} { function ${__construct}() { ${selection}${cursor} } } |
fnc |
function ${functionName}($$${param}) { ${selection}${cursor} } |
iface |
interface ${InterfaceName} { ${cursor} } |
ifnc |
public function ${functionName}($$${param}); |
pcon |
parent::__construct(); ${cursor} |
thr |
throw new ${Exception}; |
tryc |
try { ${selection}${cursor} } catch (${Exception} $$${exc}) { echo $$${exc editable=false}->getTraceAsString(); } |
vdoc |
/ @var $$${VARIABLE variableFromNextAssignmentName default="variable"} ${VAR_TYPE variableFromNextAssignmentType default="ClassName"} / |
|
|
Php statements
do |
do { ${selection}${cursor} } while (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}); |
elif |
elseif (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}) { ${selection}${cursor} } |
els |
else { ${selection}${cursor} } |
fore |
foreach (${ARRAY variableFromPreviousAssignment instanceof="array" default="$array"} as $$${value}) { ${selection}${cursor} } |
if |
if (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}) { ${selection}${cursor} } |
inst |
if (${VARIABLE variableFromPreviousAssignment default="$variable"} instanceof ${ClassName}) { ${selection}${cursor} } |
itdir |
$$${DIRH newVarName default="dirh"} = opendir(${$dirname}); if ($$${DIRH editable=false}) { while (($$${DIR_ELEM newVarName default="dirElement"} = readdir(${DIRH editable=false})) !== false) { ${selection}${cursor} } closedir($$${DIRH editable=false}); } |
iter |
for ($$${IDX newVarName default="index"} = 0; $$${IDX editable=false} < count(${ARRAY variableFromPreviousAssignment instanceof="array" default="$array"}); $$${IDX editable=false}++) { ${selection}${cursor} } |
swi |
switch (${VARIABLE variableFromPreviousAssignment default="$variable"}) { case ${$value}: ${selection}${cursor} break; default: break; } |
while |
while (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}) { ${selection}${cursor} } |
|
|
Php print data
eco |
echo(“${message}”); ${cursor} |
pr |
print ${VARIABLE variableFromPreviousAssignment default="$variable"}; ${cursor} |
prln |
print ${VARIABLE variableFromPreviousAssignment default="$variable"}."\n"; ${cursor} |
prs |
print "${cursor}"; |
prv |
print "\${VARIABLE variableFromPreviousAssignment default="$variable"} = ".${VARIABLE editable=false}."\n"; ${cursor} |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by [deleted]