3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function save($args) { $args = $args + array( 'fID' => 0, 'fOnstateID' => 0, 'maxWidth' => 0, 'maxHeight' => 0, 'constrainImage' => 0, 'linkType' => 0, 'externalLink' => '', 'internalLinkCID' => 0, ); var_dump($args); } save(array()); save(null);
Output for 7.0.0 - 7.2.0
array(8) { ["fID"]=> int(0) ["fOnstateID"]=> int(0) ["maxWidth"]=> int(0) ["maxHeight"]=> int(0) ["constrainImage"]=> int(0) ["linkType"]=> int(0) ["externalLink"]=> string(0) "" ["internalLinkCID"]=> int(0) } Fatal error: Uncaught Error: Unsupported operand types in /in/DM324:5 Stack trace: #0 /in/DM324(19): save(NULL) #1 {main} thrown in /in/DM324 on line 5
Process exited with code 255.
Output for 5.3.21 - 5.6.28
array(8) { ["fID"]=> int(0) ["fOnstateID"]=> int(0) ["maxWidth"]=> int(0) ["maxHeight"]=> int(0) ["constrainImage"]=> int(0) ["linkType"]=> int(0) ["externalLink"]=> string(0) "" ["internalLinkCID"]=> int(0) } Fatal error: Unsupported operand types in /in/DM324 on line 13
Process exited with code 255.