3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $length = "8,2"; $column = []; list($column['numeric_precision'], $column['numeric_scale']) = explode(',', $length); var_dump($column);
based on ZqvI3
Output for 7.0.0 - 7.2.0
array(2) { ["numeric_precision"]=> string(1) "8" ["numeric_scale"]=> string(1) "2" }
Output for 5.4.10 - 5.6.28
array(2) { ["numeric_scale"]=> string(1) "2" ["numeric_precision"]=> string(1) "8" }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/c6KB7 on line 4
Process exited with code 255.