3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $formData = array(); echo 'empty($formData[chain_id]): '; var_dump(empty($formData['chain_id'])); echo "\n"; echo '$formData[chain_id] === '0': '; var_dump($formData['chain_id'] === '0'); echo "\n"; $formData['chain_id'] = 0 echo 'empty($formData[chain_id]): '; var_dump(empty($formData['chain_id'])); echo "\n"; echo '$formData[chain_id] === '0': '; var_dump($formData['chain_id'] === '0'); echo "\n"; $formData['chain_id'] = 1 echo 'empty($formData[chain_id]): '; var_dump(empty($formData['chain_id'])); echo "\n"; echo '$formData[chain_id] === '0': '; var_dump($formData['chain_id'] === '0'); echo "\n";
Output for 5.4.0 - 5.5.2
Parse error: syntax error, unexpected '0' (T_LNUMBER), expecting ',' or ';' in /in/vjp30 on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in /in/vjp30 on line 7
Process exited with code 255.