3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'foo' => 'bar', 'baz' => array( 'test' => 'bat', ), ); $string = json_encode($arr); echo $string, '<br/>'; $json = json_decode($string, true); $json['stuff']['name'] ='me'; $newJsonString = json_encode($json);

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.3.40.0060.00918.61
8.3.30.0070.00719.02
8.3.20.0040.00418.85
8.3.10.0040.01121.05
8.3.00.0040.00421.83
8.2.170.0120.00322.96
8.2.160.0130.00020.52
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0080.00021.06
8.2.110.0070.00320.52
8.2.100.0040.00717.97
8.2.90.0000.00819.25
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0070.00017.93
8.2.50.0050.00318.07
8.2.40.0000.00818.22
8.2.30.0000.00721.23
8.2.20.0000.00717.70
8.2.10.0000.00717.76
8.2.00.0090.00017.75
8.1.270.0040.00423.99
8.1.260.0110.00726.35
8.1.250.0040.00428.09
8.1.240.0080.00023.92
8.1.230.0090.00317.42
8.1.220.0000.00818.77
8.1.210.0000.00818.90
8.1.200.0060.00317.23
8.1.190.0040.00417.51
8.1.180.0000.00718.10
8.1.170.0050.00318.46
8.1.160.0050.00318.86
8.1.150.0000.00818.61
8.1.140.0000.00717.37
8.1.130.0000.00717.74
8.1.120.0000.00817.31
8.1.110.0000.00817.39
8.1.100.0040.00417.43
8.1.90.0000.00817.37
8.1.80.0040.00417.46
8.1.70.0000.00717.36
8.1.60.0040.00717.40
8.1.50.0000.00817.36
8.1.40.0040.00417.46
8.1.30.0080.00017.58
8.1.20.0030.00617.54
8.1.10.0040.00417.50
8.1.00.0000.00817.48
8.0.300.0030.00319.98
8.0.290.0040.00417.16
8.0.280.0050.00218.55
8.0.270.0020.00517.13
8.0.260.0060.00016.73
8.0.250.0040.00416.87
8.0.240.0000.00916.88
8.0.230.0070.00016.77
8.0.220.0030.00316.81
8.0.210.0000.01016.71
8.0.200.0030.00316.84
8.0.190.0040.00416.90
8.0.180.0020.00516.70
8.0.170.0030.00516.87
8.0.160.0030.00416.85
8.0.150.0030.00316.69
8.0.140.0000.00716.74
8.0.130.0030.00313.21
8.0.120.0000.00816.69
8.0.110.0000.00716.80
8.0.100.0040.00416.86
8.0.90.0040.00416.74
8.0.80.0060.00916.86
8.0.70.0020.00516.79
8.0.60.0080.00016.71
8.0.50.0000.00816.80
8.0.30.0070.01116.89
8.0.20.0080.01317.40
8.0.10.0050.00217.00
8.0.00.0070.01116.88
7.4.330.0060.00016.77
7.4.320.0030.00316.52
7.4.300.0070.00016.53
7.4.290.0030.00316.39
7.4.280.0070.00016.51
7.4.270.0000.00716.36
7.4.260.0000.00513.14
7.4.250.0040.00416.51
7.4.240.0030.00316.37
7.4.230.0030.00316.48
7.4.220.0060.01216.52
7.4.210.0100.00816.54
7.4.200.0030.00316.27
7.4.190.0070.00016.60
7.4.160.0150.00716.29
7.4.150.0060.01317.40
7.4.140.0100.00717.86
7.4.130.0110.00716.38
7.4.120.0140.00816.60
7.4.110.0130.00316.41
7.4.100.0170.00016.54
7.4.90.0040.01816.57
7.4.80.0120.01019.39
7.4.70.0100.01016.22
7.4.60.0040.01416.42
7.4.50.0000.00816.11
7.4.40.0030.01622.77
7.4.30.0070.01016.55
7.4.00.0060.01015.00
7.3.330.0000.00613.10
7.3.320.0030.00313.13
7.3.310.0030.00316.21
7.3.300.0060.00016.17
7.3.290.0100.01016.37
7.3.280.0110.00816.27
7.3.270.0110.00717.40
7.3.260.0090.00818.24
7.3.250.0080.01316.47
7.3.240.0070.01416.34
7.3.230.0140.00316.39
7.3.210.0150.00316.28
7.3.200.0060.01216.31
7.3.190.0050.01116.63
7.3.180.0130.00316.27
7.3.170.0030.01216.36
7.3.160.0130.00316.55
7.3.120.0080.00714.77
7.3.110.0070.01014.70
7.3.100.0080.00614.93
7.3.90.0100.00814.70
7.3.80.0030.01014.90
7.3.70.0020.01214.87
7.3.60.0050.00914.84
7.3.50.0050.00914.63
7.3.40.0060.00714.84
7.3.30.0060.00714.81
7.3.20.0060.00816.74
7.3.10.0060.00916.70
7.3.00.0040.01016.57
7.2.330.0120.00616.43
7.2.320.0100.01316.77
7.2.310.0070.01016.59
7.2.300.0080.01516.45
7.2.290.0030.01316.79
7.2.250.0080.01015.14
7.2.240.0050.01515.11
7.2.230.0070.00915.07
7.2.220.0090.00715.02
7.2.210.0090.00415.24
7.2.200.0110.00314.94
7.2.190.0070.00314.99
7.2.180.0060.00915.04
7.2.170.0050.00614.80
7.2.130.0100.00316.95
7.2.120.0100.00516.74
7.2.110.0050.00716.96
7.2.100.0070.00517.06
7.2.90.0100.00517.06
7.2.80.0000.01316.73
7.2.70.0030.01216.95
7.2.60.0030.00916.93
7.2.50.0090.00416.96
7.2.40.0070.00917.00
7.2.30.0020.01116.96
7.2.20.0130.00316.89
7.2.10.0070.00316.79
7.2.00.0050.00917.75
7.1.330.0070.00515.83
7.1.320.0100.00215.73
7.1.310.0020.01015.74
7.1.300.0070.00515.84
7.1.290.0060.00615.65
7.1.280.0030.00715.60
7.1.270.0030.00915.72
7.1.260.0020.01215.69
7.1.250.0030.00815.61
7.1.200.0040.00715.45
7.1.100.0090.00317.89
7.1.70.0000.00716.86
7.1.60.0030.00819.17
7.1.50.0140.01016.62
7.1.00.0070.06722.31
7.0.200.0000.01316.83
7.0.140.0030.07322.00
7.0.90.0100.04321.72
7.0.80.0070.03721.82
7.0.70.0030.03721.71
7.0.60.0000.04321.68
7.0.50.0070.07022.09
7.0.40.0070.04320.11
7.0.30.0030.08020.04
7.0.20.0030.06320.00
7.0.10.0100.05020.07
7.0.00.0130.07720.13
5.6.280.0100.06721.16
5.6.240.0070.03720.63
5.6.230.0000.04320.62
5.6.220.0070.03720.55
5.6.210.0100.03720.55
5.6.200.0000.09021.00
5.6.190.0070.03720.93
5.6.180.0100.07021.16
5.6.170.0170.08020.93
5.6.160.0030.05721.10
5.6.150.0000.07321.05
5.6.140.0030.04321.01
5.6.130.0100.04320.95
5.6.120.0100.08021.16
5.6.110.0100.08320.99
5.6.100.0030.04721.03
5.6.90.0070.07721.05
5.6.80.0100.05320.48
5.6.70.0070.08020.46
5.6.60.0130.07020.37
5.6.50.0130.06320.48
5.6.40.0070.05720.43
5.6.30.0100.08020.46
5.6.20.0070.07320.38
5.6.10.0100.07020.30
5.6.00.0170.07020.45
5.5.380.0030.06020.49
5.5.370.0030.04020.35
5.5.360.0030.07720.53
5.5.350.0030.04720.36
5.5.340.0100.05720.91
5.5.330.0100.07720.85
5.5.320.0000.05320.63
5.5.310.0070.08320.77
5.5.300.0000.06320.82
5.5.290.0070.07320.82
5.5.280.0030.07020.63
5.5.270.0070.08320.89
5.5.260.0000.08020.84
5.5.250.0030.07720.58
5.5.240.0030.08020.25
5.5.230.0100.07720.25
5.5.220.0000.08020.16
5.5.210.0100.06720.22
5.5.200.0130.07020.20
5.5.190.0000.08020.07
5.5.180.0100.07720.14
5.5.160.0030.08020.07
5.5.150.0070.08320.10
5.5.140.0130.07020.11
5.5.130.0070.08020.11
5.5.120.0100.04320.09
5.5.110.0030.08020.22
5.5.100.0070.07720.16
5.5.90.0070.07720.05
5.5.80.0100.06320.16
5.5.70.0130.03720.03
5.5.60.0070.07320.14
5.5.50.0170.07720.14
5.5.40.0130.07720.09
5.5.30.0070.05320.04
5.5.20.0000.07320.04
5.5.10.0070.08020.06
5.5.00.0070.07320.02
5.4.450.0070.05019.39
5.4.440.0100.07719.25
5.4.430.0030.05719.44
5.4.420.0100.04019.35
5.4.410.0030.06719.22
5.4.400.0000.08319.12
5.4.390.0100.07719.11
5.4.380.0070.07719.23
5.4.370.0130.06719.07
5.4.360.0070.09319.07
5.4.350.0000.08319.04
5.4.340.0070.07719.11
5.4.320.0000.08019.11
5.4.310.0100.07019.03
5.4.300.0070.06019.14
5.4.290.0030.06319.11
5.4.280.0000.08719.14
5.4.270.0100.04319.11
5.4.260.0000.08018.90
5.4.250.0070.04319.22
5.4.240.0100.07318.97
5.4.230.0130.07318.89
5.4.220.0130.04319.22
5.4.210.0100.07318.97
5.4.200.0030.06319.06
5.4.190.0170.06719.06
5.4.180.0030.07319.02
5.4.170.0000.07318.76
5.4.160.0030.07719.00
5.4.150.0030.07019.05
5.4.140.0030.06716.02
5.4.130.0030.05716.23
5.4.120.0070.04016.30
5.4.110.0030.07316.33
5.4.100.0030.07716.26
5.4.90.0100.04016.30
5.4.80.0070.06316.43
5.4.70.0130.05316.36
5.4.60.0030.07016.28
5.4.50.0070.07016.18
5.4.40.0130.06016.25
5.4.30.0070.06716.18
5.4.20.0000.07716.19
5.4.10.0030.07016.37
5.4.00.0130.05015.67
5.3.290.0030.06014.52
5.3.280.0030.07714.45
5.3.270.0100.07314.63
5.3.260.0030.06014.49
5.3.250.0030.08714.44
5.3.240.0070.08314.47
5.3.230.0030.06314.45
5.3.220.0070.05014.43
5.3.210.0000.08014.42
5.3.200.0000.05014.52
5.3.190.0170.05014.41
5.3.180.0070.07314.42
5.3.170.0070.07714.44
5.3.160.0000.08014.42
5.3.150.0000.04714.54
5.3.140.0070.05714.41
5.3.130.0000.06714.41
5.3.120.0070.08014.55
5.3.110.0000.05314.56
5.3.100.0070.06714.03
5.3.90.0070.07013.86
5.3.80.0000.08314.03
5.3.70.0030.07013.99
5.3.60.0070.03713.96
5.3.50.0070.06713.86
5.3.40.0000.08013.90
5.3.30.0100.06713.87
5.3.20.0100.06713.65
5.3.10.0030.04713.66
5.3.00.0030.05013.50
5.2.170.0000.06311.14
5.2.160.0070.05711.09
5.2.150.0070.06010.98
5.2.140.0030.05711.13
5.2.130.0000.06710.91
5.2.120.0030.05311.09
5.2.110.0030.05711.14
5.2.100.0030.06310.95
5.2.90.0030.05311.11
5.2.80.0030.05311.07
5.2.70.0030.06311.05
5.2.60.0130.05711.00
5.2.50.0030.04710.88
5.2.40.0030.03311.01
5.2.30.0030.04711.02
5.2.20.0070.05710.95
5.2.10.0000.06010.88
5.2.00.0030.06010.77
5.1.60.0130.0479.98
5.1.50.0000.05310.07
5.1.40.0000.05310.02
5.1.30.0000.04710.36
5.1.20.0070.04710.37
5.1.10.0070.05010.13
5.1.00.0100.05010.09
5.0.50.0030.0378.54
5.0.40.0100.0378.45
5.0.30.0000.0678.27
5.0.20.0030.0438.29
5.0.10.0000.0438.26
5.0.00.0000.0708.00
4.4.90.0030.0277.37
4.4.80.0000.0377.37
4.4.70.0000.0307.37
4.4.60.0000.0337.37
4.4.50.0000.0307.37
4.4.40.0000.0507.37
4.4.30.0030.0337.37
4.4.20.0030.0237.37
4.4.10.0030.0307.37
4.4.00.0030.0407.37
4.3.110.0030.0337.37
4.3.100.0000.0337.37
4.3.90.0100.0237.37
4.3.80.0000.0577.37
4.3.70.0000.0377.37
4.3.60.0030.0307.37
4.3.50.0000.0377.37
4.3.40.0000.0507.37
4.3.30.0000.0377.37
4.3.20.0030.0277.37
4.3.10.0030.0207.37
4.3.00.0000.0337.37

preferences:
35.57 ms | 400 KiB | 5 Q