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); $json->stuff->name = 'me'; $json->stuff->description = 'useless'; $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.60.0100.00316.86
8.3.50.0100.00717.52
8.3.40.0110.00418.96
8.3.30.0150.00318.97
8.3.20.0060.00318.90
8.3.10.0040.00420.57
8.3.00.0050.00319.38
8.2.180.0120.00916.88
8.2.170.0120.00622.96
8.2.160.0100.00720.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00617.50
8.2.110.0070.00420.93
8.2.100.0120.00017.96
8.2.90.0000.01020.80
8.2.80.0040.00418.05
8.2.70.0070.00317.63
8.2.60.0070.00217.93
8.2.50.0060.00318.07
8.2.40.0080.00018.28
8.2.30.0040.00417.98
8.2.20.0080.00017.63
8.2.10.0000.00717.73
8.2.00.0040.00717.86
8.1.280.0140.00025.92
8.1.270.0050.00224.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00722.50
8.1.230.0090.00321.02
8.1.220.0040.00417.74
8.1.210.0050.00318.84
8.1.200.0030.00617.36
8.1.190.0040.00417.48
8.1.180.0050.00318.10
8.1.170.0040.00418.83
8.1.160.0080.00018.76
8.1.150.0000.00718.59
8.1.140.0050.00317.48
8.1.130.0030.00317.88
8.1.120.0030.00517.41
8.1.110.0000.00717.41
8.1.100.0040.00417.30
8.1.90.0030.00617.36
8.1.80.0030.00317.33
8.1.70.0000.00817.39
8.1.60.0030.00517.50
8.1.50.0060.00317.47
8.1.40.0000.00817.45
8.1.30.0000.00817.62
8.1.20.0030.00617.59
8.1.10.0000.00717.59
8.1.00.0000.00817.40
8.0.300.0060.00320.03
8.0.290.0040.00416.75
8.0.280.0050.00218.38
8.0.270.0030.00517.28
8.0.260.0030.00316.80
8.0.250.0040.00417.02
8.0.240.0030.00316.95
8.0.230.0050.00316.87
8.0.220.0000.00716.91
8.0.210.0030.00316.93
8.0.200.0000.00616.95
8.0.190.0050.00516.96
8.0.180.0040.00416.93
8.0.170.0030.00616.84
8.0.160.0070.00016.90
8.0.150.0000.00816.91
8.0.140.0080.00016.84
8.0.130.0030.00313.39
8.0.120.0040.00416.84
8.0.110.0000.00716.73
8.0.100.0000.00916.92
8.0.90.0030.00516.96
8.0.80.0100.00616.91
8.0.70.0040.00416.86
8.0.60.0000.00716.68
8.0.50.0040.00416.72
8.0.30.0120.00917.24
8.0.20.0090.01117.21
8.0.10.0020.00516.95
8.0.00.0100.00816.70
7.4.330.0020.00212.93
7.4.320.0030.00316.53
7.4.300.0000.00716.48
7.4.290.0000.00716.44
7.4.280.0040.00416.46
7.4.270.0030.00316.55
7.4.260.0060.00013.16
7.4.250.0080.00016.34
7.4.240.0030.00316.48
7.4.230.0030.00316.55
7.4.220.0090.01016.31
7.4.210.0090.00716.47
7.4.200.0000.00716.57
7.4.190.0070.00016.57
7.4.160.0110.00716.52
7.4.150.0180.00016.54
7.4.140.0090.01016.49
7.4.130.0100.00916.63
7.4.120.0090.01316.49
7.4.110.0070.01016.27
7.4.100.0070.01016.44
7.4.90.0120.00616.50
7.4.80.0120.00919.39
7.4.70.0040.01316.53
7.4.60.0120.00716.34
7.4.50.0040.00416.28
7.4.40.0090.00316.55
7.4.30.0100.00716.49
7.4.00.0070.01015.14
7.3.330.0000.00713.20
7.3.320.0030.00313.20
7.3.310.0050.00316.26
7.3.300.0040.00416.36
7.3.290.0060.00816.31
7.3.280.0070.00916.31
7.3.270.0100.00716.49
7.3.260.0090.01316.51
7.3.250.0150.00816.40
7.3.240.0080.01216.51
7.3.230.0120.00616.59
7.3.210.0120.00416.61
7.3.200.0070.01216.59
7.3.190.0140.00916.33
7.3.180.0130.00316.52
7.3.170.0060.01116.50
7.3.160.0080.00816.29
7.3.120.0090.00614.73
7.2.330.0090.00916.59
7.2.320.0090.00916.46
7.2.310.0110.01116.64
7.2.300.0070.01016.61
7.2.290.0110.00816.55
7.2.110.0280.00716.70
7.2.00.0040.01219.12
7.1.100.0080.00318.33
7.1.70.0070.00316.90
7.1.60.0070.01719.40
7.1.50.0000.02316.79
7.1.00.0030.06322.50
7.0.200.0400.00614.71
7.0.140.0030.07322.05
7.0.120.0030.07322.19
7.0.90.0030.08719.91
7.0.80.0100.05019.99
7.0.70.0070.09719.84
7.0.60.0100.08319.96
7.0.50.0100.05020.36
7.0.40.0070.07020.13
7.0.30.0100.08020.03
7.0.20.0070.05020.09
7.0.10.0100.06020.04
7.0.00.0030.05719.93
5.6.280.0000.07720.89
5.6.240.0100.07320.61
5.6.230.0170.07320.63
5.6.220.0200.06720.64
5.6.210.0100.06720.68
5.6.200.0170.05021.11
5.6.190.0070.05721.18
5.6.180.0000.05021.03
5.6.170.0030.07721.00
5.6.160.0030.07021.08
5.6.150.0100.06021.04
5.6.140.0070.05721.03
5.6.130.0100.04021.10
5.6.120.0170.06720.96
5.6.110.0170.07320.92
5.6.100.0130.05020.99
5.6.90.0030.06021.12
5.6.80.0100.05020.51
5.6.70.0230.06320.40
5.6.60.0100.07320.37
5.6.50.0070.07320.34
5.6.40.0030.07020.38
5.6.30.0070.08020.37
5.6.20.0170.05320.30
5.6.10.0030.06720.49
5.6.00.0070.05720.37
5.5.380.0030.09020.36
5.5.370.0100.07020.35
5.5.360.0100.04320.53
5.5.350.0070.06720.49
5.5.340.0070.07020.73
5.5.330.0070.05720.77
5.5.320.0070.04020.91
5.5.310.0070.07020.80
5.5.300.0130.07720.88
5.5.290.0070.05720.86
5.5.280.0070.05020.86
5.5.270.0130.07020.77
5.5.260.0070.09320.88
5.5.250.0100.07720.71
5.5.240.0070.05720.16
5.5.230.0070.05020.11
5.5.220.0070.07720.20
5.5.210.0130.07320.13
5.5.200.0100.05720.15
5.5.190.0070.07320.13
5.5.180.0100.07020.20
5.5.160.0030.08719.99
5.5.150.0030.04320.13
5.5.140.0100.05720.21
5.5.130.0100.07020.16
5.5.120.0030.06720.14
5.5.110.0100.07020.13
5.5.100.0130.06320.10
5.5.90.0130.06720.09
5.5.80.0130.07720.14
5.5.70.0130.07319.96
5.5.60.0070.04320.09
5.5.50.0100.07719.93
5.5.40.0070.05319.92
5.5.30.0100.06320.15
5.5.20.0030.08019.95
5.5.10.0000.06720.02
5.5.00.0000.08320.04
5.4.450.0070.06019.45
5.4.440.0030.08319.27
5.4.430.0070.08319.39
5.4.420.0130.07719.29
5.4.410.0130.07719.02
5.4.400.0030.05019.05
5.4.390.0170.03019.05
5.4.380.0070.07718.90
5.4.370.0070.07019.09
5.4.360.0000.04719.05
5.4.350.0070.05019.14
5.4.340.0000.06018.90
5.4.320.0100.08018.90
5.4.310.0130.04319.02
5.4.300.0030.08018.94
5.4.290.0070.07318.97
5.4.280.0030.07719.12
5.4.270.0070.07318.89
5.4.260.0130.06318.78
5.4.250.0030.08019.22
5.4.240.0100.04719.07
5.4.230.0000.07719.09
5.4.220.0070.05718.96
5.4.210.0030.06719.22
5.4.200.0070.04019.13
5.4.190.0030.04718.95
5.4.180.0030.08019.01
5.4.170.0030.07719.03
5.4.160.0070.07319.09
5.4.150.0030.07318.94
5.4.140.0100.03316.32
5.4.130.0100.06716.27
5.4.120.0030.07316.28
5.4.110.0030.07316.30
5.4.100.0130.06316.42
5.4.90.0030.07716.21
5.4.80.0070.08016.34
5.4.70.0100.07016.25
5.4.60.0030.08016.20
5.4.50.0070.06716.39
5.4.40.0100.06716.43
5.4.30.0100.05016.18
5.4.20.0130.03716.19
5.4.10.0030.07316.32
5.4.00.0100.06715.78
5.3.290.0130.04014.63
5.3.280.0100.07314.59
5.3.270.0130.07014.62
5.3.260.0100.07314.55
5.3.250.0100.07014.46
5.3.240.0070.06314.61
5.3.230.0100.07014.57
5.3.220.0170.06714.56
5.3.210.0070.07314.55
5.3.200.0070.08014.41
5.3.190.0030.05314.55
5.3.180.0170.06314.52
5.3.170.0100.07314.50
5.3.160.0070.07314.54
5.3.150.0030.06314.57
5.3.140.0030.07714.46
5.3.130.0030.07714.53
5.3.120.0070.04714.51
5.3.110.0000.07714.37
5.3.100.0130.07013.87
5.3.90.0100.06713.93
5.3.80.0100.04014.01
5.3.70.0200.06014.03
5.3.60.0070.05313.86
5.3.50.0130.06013.95
5.3.40.0200.06013.80
5.3.30.0030.04313.91
5.3.20.0030.07013.68
5.3.10.0030.03313.65
5.3.00.0000.04013.65
5.2.170.0130.03311.13
5.2.160.0070.06310.98
5.2.150.0030.06011.00
5.2.140.0030.03311.17
5.2.130.0000.03011.02
5.2.120.0070.03011.14
5.2.110.0000.03311.12
5.2.100.0030.02711.07
5.2.90.0000.03010.92
5.2.80.0030.02711.07
5.2.70.0000.03010.88
5.2.60.0070.02311.07
5.2.50.0000.03011.05
5.2.40.0000.03010.83
5.2.30.0100.02710.96
5.2.20.0100.02010.82
5.2.10.0070.02310.91
5.2.00.0000.04310.63
5.1.60.0000.02710.02
5.1.50.0030.04010.03
5.1.40.0030.0439.81
5.1.30.0000.03310.38
5.1.20.0000.02310.39
5.1.10.0000.0279.90
5.1.00.0000.02710.05
5.0.50.0070.0178.61
5.0.40.0000.0208.45
5.0.30.0000.0308.10
5.0.20.0030.0178.19
5.0.10.0030.0278.28
5.0.00.0030.0238.27
4.4.90.0000.0177.17
4.4.80.0000.0177.17
4.4.70.0030.0307.17
4.4.60.0000.0177.17
4.4.50.0000.0177.17
4.4.40.0070.0307.17
4.4.30.0000.0137.17
4.4.20.0000.0177.17
4.4.10.0030.0137.17
4.4.00.0070.0177.17
4.3.110.0030.0137.17
4.3.100.0030.0207.17
4.3.90.0030.0137.17
4.3.80.0030.0407.17
4.3.70.0000.0177.17
4.3.60.0000.0137.17
4.3.50.0000.0137.17
4.3.40.0000.0377.17
4.3.30.0000.0137.17
4.3.20.0030.0137.17
4.3.10.0000.0177.17
4.3.00.0000.0137.17

preferences:
88.53 ms | 401 KiB | 5 Q