3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json='{"description":"Testing","site":"http:\\/\\/localhost","steps":{"step":{"command":"grabimage","parameter":"img[alt=\\"1Next\\"]"}}}'; /*$array=array ( 'description' => 'Testing', 'site' => 'http://localhost', 'steps' => array ( 'step' => array ( 'command' => 'grabimage', 'parameter' => 'img[alt="1Next"]', ) ), );*/ //var_export(json_encode($array)); $array=json_decode($json,true); if(key($array['steps']['step'])==='command'){ $array['steps']['step']=[$array['steps']['step']]; } var_export($array);

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)
8.4.130.0110.00917.70
8.4.120.0030.00720.65
8.4.110.0110.01118.93
8.4.100.0120.00718.61
8.4.90.0070.00218.84
8.4.80.0120.00818.70
8.4.70.0050.00518.06
8.4.60.0090.00918.69
8.4.50.0100.01118.96
8.4.40.0130.00619.44
8.4.30.0090.01017.50
8.4.20.0070.01419.37
8.4.10.0060.00317.75
8.3.260.0110.00816.82
8.3.250.0120.00618.95
8.3.240.0080.01216.46
8.3.230.0110.00916.74
8.3.220.0060.00119.11
8.3.210.0100.00916.44
8.3.200.0120.00716.43
8.3.190.0090.01017.02
8.3.180.0120.00817.03
8.3.170.0070.01122.59
8.3.160.0140.00417.25
8.3.150.0130.00616.37
8.3.140.0110.00318.87
8.3.130.0050.00518.52
8.3.120.0060.00319.16
8.3.110.0100.00620.94
8.3.100.0060.00324.06
8.3.90.0070.01026.77
8.3.80.0050.00518.43
8.3.70.0150.00616.38
8.3.60.0040.01118.55
8.3.50.0120.00317.35
8.3.40.0110.00718.88
8.3.30.0080.00818.70
8.3.20.0050.00221.82
8.3.10.0000.00821.72
8.3.00.0040.00419.68
8.2.290.0120.00718.76
8.2.280.0090.01018.46
8.2.270.0070.01117.06
8.2.260.0140.00316.50
8.2.250.0160.00416.64
8.2.240.0000.00818.73
8.2.230.0120.00222.58
8.2.220.0100.00037.54
8.2.210.0190.00026.77
8.2.200.0040.00416.38
8.2.190.0100.01016.88
8.2.180.0030.01416.70
8.2.170.0120.00622.96
8.2.160.0110.00322.31
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0040.00420.39
8.2.120.0040.00426.35
8.2.110.0090.00019.24
8.2.100.0060.00617.91
8.2.90.0040.00418.99
8.2.80.0000.00817.97
8.2.70.0100.00017.75
8.2.60.0000.00817.50
8.2.50.0030.00517.63
8.2.40.0000.00817.62
8.2.30.0030.00617.84
8.2.20.0070.00018.14
8.2.10.0030.00618.13
8.2.00.0070.00018.17
8.1.330.0120.00618.41
8.1.320.0140.00516.27
8.1.310.0080.00018.35
8.1.300.0040.01118.41
8.1.290.0030.00730.84
8.1.280.0100.00525.92
8.1.270.0030.00723.50
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0060.00319.17
8.1.230.0110.00019.15
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0050.00317.23
8.1.190.0050.00319.14
8.1.180.0000.00918.10
8.1.170.0040.00417.62
8.1.160.0040.00418.89
8.1.150.0030.00320.20
8.1.140.0080.00017.62
8.1.130.0000.00719.03
8.1.120.0040.00417.50
8.1.110.0030.00617.45
8.1.100.0040.00417.47
8.1.90.0000.00817.34
8.1.80.0000.00817.37
8.1.70.0030.00317.46
8.1.60.0000.00917.64
8.1.50.0080.00017.54
8.1.40.0030.00517.51
8.1.30.0000.00717.65
8.1.20.0000.00817.55
8.1.10.0070.00017.46
8.1.00.0040.00417.54
8.0.300.0040.00418.77
8.0.290.0020.00516.75
8.0.280.0030.00518.03
8.0.270.0030.00318.09
8.0.260.0030.00316.84
8.0.250.0060.00316.97
8.0.240.0040.00716.95
8.0.230.0000.00716.97
8.0.220.0000.00716.83
8.0.210.0000.00716.80
8.0.200.0060.00016.85
8.0.190.0030.00616.85
8.0.180.0030.00616.82
8.0.170.0040.00416.81
8.0.160.0070.00016.95
8.0.150.0080.00016.88
8.0.140.0070.00016.79
8.0.130.0030.00313.37
8.0.120.0040.00416.89
8.0.110.0040.00416.80
8.0.100.0000.00716.77
8.0.90.0040.00416.79
8.0.80.0030.01316.95
8.0.70.0000.00716.93
8.0.60.0020.00516.74
8.0.50.0070.00016.70
8.0.30.0100.01117.10
8.0.20.0090.01217.40
8.0.10.0040.00416.84
8.0.00.0060.01216.70
7.4.330.0000.00515.55
7.4.320.0070.00016.63
7.4.300.0060.00016.55
7.4.290.0000.00716.43
7.4.280.0090.00016.44
7.4.270.0050.00216.56
7.4.260.0030.00316.50
7.4.250.0030.00316.48
7.4.240.0000.00716.54
7.4.230.0050.00316.42
7.4.220.0030.00516.30
7.4.210.0100.00916.69
7.4.200.0040.00416.36
7.4.160.0070.01016.58
7.4.150.0120.00617.40
7.4.140.0090.01017.86
7.4.130.0090.01016.70
7.4.120.0090.01116.55
7.4.110.0070.01016.64
7.4.100.0090.00916.50
7.4.90.0030.01716.45
7.4.80.0070.01519.39
7.4.70.0070.01316.52
7.4.60.0090.00616.45
7.4.50.0060.00916.37
7.4.40.0140.00716.36
7.4.00.0070.01014.76
7.3.330.0030.00313.20
7.3.320.0030.00313.05
7.3.310.0040.00416.21
7.3.300.0000.00716.29
7.3.290.0070.01116.31
7.3.280.0070.00716.27
7.3.270.0130.00317.40
7.3.260.0130.00816.31
7.3.240.0080.00916.39
7.3.230.0060.01116.36
7.3.210.0090.00616.38
7.3.200.0030.01416.55
7.3.190.0100.00616.34
7.3.180.0060.01416.30
7.3.170.0090.00916.46
7.3.160.0090.00616.44
7.3.10.0070.00716.36
7.3.00.0040.00716.26
7.2.330.0000.01616.42
7.2.320.0060.01116.67
7.2.310.0110.00616.47
7.2.300.0040.01216.75
7.2.290.0000.02316.43
7.2.130.0030.01216.80
7.2.120.0090.00316.67
7.2.110.0030.01016.46
7.2.100.0000.01316.45
7.2.90.0070.00716.66
7.2.80.0040.00816.84
7.2.70.0080.00416.80
7.2.60.0080.00416.80
7.2.50.0060.00816.89
7.2.40.0060.00816.94
7.2.30.0000.01116.57
7.2.20.0150.00517.29
7.2.10.0080.01317.11
7.2.00.0090.01017.50
7.1.250.0030.00715.29
7.1.200.0030.01015.87
7.1.140.0690.01216.88
7.1.130.0130.00916.37
7.1.120.0090.01116.52
7.1.110.0470.01016.07
7.1.100.0100.01116.10
7.1.90.0090.00815.88
7.1.80.0110.01216.42
7.1.70.0120.01315.06
7.1.60.0330.01933.41
7.1.50.0430.02133.02
7.1.40.0450.01732.45
7.1.30.0300.02132.49
7.1.20.0340.01432.71
7.1.10.0020.00314.62
7.1.00.0150.00915.04

preferences:
27.54 ms | 403 KiB | 5 Q