3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shop = array( array( Title => "rose", Price => 1.25, Number => 15 ), array( Title => "daisy", Price => 0.75, Number => 25, ), array( Title => "orchid", Price => 1.15, Number => 7 ) ); var_dump($shop); $shops = array( array("rose", 1.25 , 15), array("daisy", 0.75 , 25), array("orchid", 1.15 , 7) ); var_dump($shops);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "Title" in /in/2HQIT:2 Stack trace: #0 {main} thrown in /in/2HQIT on line 2
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant Title - assumed 'Title' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 2 Warning: Use of undefined constant Price - assumed 'Price' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 3 Warning: Use of undefined constant Number - assumed 'Number' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 4 Warning: Use of undefined constant Title - assumed 'Title' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 6 Warning: Use of undefined constant Price - assumed 'Price' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 7 Warning: Use of undefined constant Number - assumed 'Number' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 8 Warning: Use of undefined constant Title - assumed 'Title' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 10 Warning: Use of undefined constant Price - assumed 'Price' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 11 Warning: Use of undefined constant Number - assumed 'Number' (this will throw an Error in a future version of PHP) in /in/2HQIT on line 12 array(3) { [0]=> array(3) { ["Title"]=> string(4) "rose" ["Price"]=> float(1.25) ["Number"]=> int(15) } [1]=> array(3) { ["Title"]=> string(5) "daisy" ["Price"]=> float(0.75) ["Number"]=> int(25) } [2]=> array(3) { ["Title"]=> string(6) "orchid" ["Price"]=> float(1.15) ["Number"]=> int(7) } } array(3) { [0]=> array(3) { [0]=> string(4) "rose" [1]=> float(1.25) [2]=> int(15) } [1]=> array(3) { [0]=> string(5) "daisy" [1]=> float(0.75) [2]=> int(25) } [2]=> array(3) { [0]=> string(6) "orchid" [1]=> float(1.15) [2]=> int(7) } }
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25
Notice: Use of undefined constant Title - assumed 'Title' in /in/2HQIT on line 2 Notice: Use of undefined constant Price - assumed 'Price' in /in/2HQIT on line 3 Notice: Use of undefined constant Number - assumed 'Number' in /in/2HQIT on line 4 Notice: Use of undefined constant Title - assumed 'Title' in /in/2HQIT on line 6 Notice: Use of undefined constant Price - assumed 'Price' in /in/2HQIT on line 7 Notice: Use of undefined constant Number - assumed 'Number' in /in/2HQIT on line 8 Notice: Use of undefined constant Title - assumed 'Title' in /in/2HQIT on line 10 Notice: Use of undefined constant Price - assumed 'Price' in /in/2HQIT on line 11 Notice: Use of undefined constant Number - assumed 'Number' in /in/2HQIT on line 12 array(3) { [0]=> array(3) { ["Title"]=> string(4) "rose" ["Price"]=> float(1.25) ["Number"]=> int(15) } [1]=> array(3) { ["Title"]=> string(5) "daisy" ["Price"]=> float(0.75) ["Number"]=> int(25) } [2]=> array(3) { ["Title"]=> string(6) "orchid" ["Price"]=> float(1.15) ["Number"]=> int(7) } } array(3) { [0]=> array(3) { [0]=> string(4) "rose" [1]=> float(1.25) [2]=> int(15) } [1]=> array(3) { [0]=> string(5) "daisy" [1]=> float(0.75) [2]=> int(25) } [2]=> array(3) { [0]=> string(6) "orchid" [1]=> float(1.15) [2]=> int(7) } }

preferences:
268.07 ms | 407 KiB | 327 Q