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.18
Parse error: syntax error, unexpected 'chain_id' (T_STRING), expecting ',' or ';' in /in/7Q5Ig on line 7
Process exited with code 255.
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'chain_id' (T_STRING), expecting ',' or ';' in /in/1V68s on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/1V68s on line 7
Process exited with code 255.