3v4l.org

run code in 300+ PHP versions simultaneously
<?php $good =['name'=> 'prinsha','surname'=> 'jangam']; $good['doggy'] = 'newjippu'; //echo $good['name']; foreach($good as $key=>$item){ echo $key .' '.$item. "\n"; } $array = [1, 2, 3,4, 5] ; // Mulltidimensional array $dogs = [ ['breed' => 'Cocker Spaniel', 'name' => ' Jypsy', 'size' => [ 'width': 5, 'height': 10]], ['breed' => 'german ', 'name' => ' Jypsy', 'size' => [ 'width': 5, 'height': 10]], ['breed' => 'Shiba Inu', 'name' => ' Kotetsu', 'size' => [ 'width': 5, 'height': 10]], ['breed' => 'Unknown', 'name' => ' Sheru Bahadur', 'size' => [ 'width': 5, 'height': 10]], ]; echo $dogs[0]; // we can use this to represent record of any kind, for example student record, anything, even complex things

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.1.70.0130.00516.96
7.1.60.0230.00735.13
7.1.50.0300.00334.75
7.1.40.0160.01634.40
7.1.30.0140.01734.32
7.1.20.0330.00334.64
7.1.10.0030.01216.09
7.1.00.0090.00916.38
7.0.200.0060.00916.49
7.0.190.0080.00616.34
7.0.180.0050.01216.02
7.0.170.0150.00416.02
7.0.160.0100.00615.97
7.0.150.0070.01115.81
7.0.140.0100.01116.07
7.0.130.0080.01116.23
7.0.120.0000.01716.08
7.0.110.0000.01616.29
7.0.100.0000.01516.01
7.0.90.0140.00516.01
7.0.80.0100.01016.33
7.0.70.0090.00616.04
7.0.60.0040.01615.95
7.0.50.0090.00916.10
7.0.40.0120.00316.54
7.0.30.0060.01016.28
7.0.20.0090.01216.18
7.0.10.0030.01516.27
7.0.00.0070.01316.27

preferences:
140.01 ms | 1386 KiB | 7 Q