3v4l.org

run code in 300+ PHP versions simultaneously
<?php $valor = array(8) { ["invoice"]=> int(34843) ["date"]=> string(10) "2001-01-23" ["bill-to"]=> &array(3) { ["given"]=> string(5) "Chris" ["family"]=> string(6) "Dumars" ["address"]=> array(4) { ["lines"]=> string(34) "458 Walkman Dr. Suite #292" ["city"]=> string(9) "Royal Oak" ["state"]=> string(2) "MI" ["postal"]=> int(48046) } } ["ship-to"]=> &array(3) { ["given"]=> string(5) "Chris" ["family"]=> string(6) "Dumars" ["address"]=> array(4) { ["lines"]=> string(34) "458 Walkman Dr. Suite #292" ["city"]=> string(9) "Royal Oak" ["state"]=> string(2) "MI" ["postal"]=> int(48046) } } ["product"]=> array(2) { [0]=> array(4) { ["sku"]=> string(6) "BL394D" ["quantity"]=> int(4) ["description"]=> string(10) "Basketball" ["price"]=> int(450) } [1]=> array(4) { ["sku"]=> string(7) "BL4438H" ["quantity"]=> int(1) ["description"]=> string(10) "Super Hoop" ["price"]=> int(2392) } } ["tax"]=> float(251.42) ["total"]=> float(4443.52) ["comments"]=> string(68) "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338." } var_dump($valor); $valoryml = yaml_emit($valor); var_dump($valoryml);
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /in/DMetA on line 3
Process exited with code 255.
Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17
Parse error: syntax error, unexpected '{' in /in/DMetA on line 2
Process exited with code 255.

preferences:
169.74 ms | 1395 KiB | 28 Q