3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['one' => 1, 'two' => 2, 'three' => 3]; $b = [1,2,3]; echo json_encode($a), "\n"; echo json_encode($b);

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.5.30.0110.00622.04
8.5.20.0060.01019.99
8.5.10.0090.00820.20
8.5.00.0130.00919.93
8.4.180.0130.01119.51
8.4.170.0120.01023.79
8.4.160.0100.01223.03
8.4.150.0050.00316.83
8.4.140.0070.01317.34
8.4.130.0100.00817.52
8.4.120.0120.00820.46
8.4.110.0120.00822.34
8.4.100.0050.00517.64
8.4.90.0080.00718.77
8.4.80.0130.00619.57
8.4.70.0120.00717.88
8.4.60.0110.00918.84
8.4.50.0110.00418.61
8.4.40.0030.00619.49
8.4.30.0090.01017.64
8.4.20.0050.00517.47
8.4.10.0060.00919.50
8.3.300.0110.00818.86
8.3.290.0090.01120.82
8.3.280.0120.01118.25
8.3.270.0160.01016.44
8.3.260.0100.00916.22
8.3.250.0090.00918.67
8.3.240.0070.01216.42
8.3.230.0090.00716.39
8.3.220.0060.00216.77
8.3.210.0060.00316.35
8.3.200.0060.00316.37
8.3.190.0050.00418.86
8.3.180.0050.00418.20
8.3.170.0150.00418.79
8.3.160.0100.00719.90
8.3.150.0150.00318.31
8.3.140.0140.00416.82
8.3.130.0050.00318.24
8.3.120.0080.00020.89
8.3.110.0110.00720.94
8.3.100.0060.00324.06
8.3.90.0050.00326.77
8.3.80.0130.00018.06
8.3.70.0060.01218.18
8.3.60.0120.00316.50
8.3.50.0070.01221.08
8.3.40.0180.00618.76
8.3.30.0130.00618.45
8.3.20.0000.00720.21
8.3.10.0050.00223.53
8.3.00.0040.00422.46
8.2.300.0100.01120.39
8.2.290.0130.00520.16
8.2.280.0130.00618.20
8.2.270.0080.00817.23
8.2.260.0110.00716.65
8.2.250.0120.00617.01
8.2.240.0030.00617.17
8.2.230.0040.01122.58
8.2.220.0000.00937.54
8.2.210.0040.00426.77
8.2.200.0110.00016.63
8.2.190.0150.00018.16
8.2.180.0080.01218.54
8.2.170.0170.00322.96
8.2.160.0070.00722.07
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0140.00026.16
8.2.120.0040.00421.02
8.2.110.0100.00021.11
8.2.100.0110.00017.91
8.2.90.0000.00717.84
8.2.80.0070.00018.16
8.2.70.0050.00317.50
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0000.00720.45
8.2.30.0000.00719.25
8.2.20.0060.00317.58
8.2.10.0030.00517.87
8.2.00.0000.00817.71
8.1.340.0130.00819.40
8.1.330.0120.00621.77
8.1.320.0120.00718.13
8.1.310.0140.00318.22
8.1.300.0080.00020.13
8.1.290.0110.00030.84
8.1.280.0070.00725.92
8.1.270.0000.00723.90
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.83
8.1.230.0110.00020.91
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0050.00318.52
8.1.160.0070.00022.09
8.1.150.0060.00318.85
8.1.140.0040.00419.50
8.1.130.0030.00317.54
8.1.120.0000.00717.37
8.1.110.0000.00717.45
8.1.100.0000.00817.42
8.1.90.0050.00317.23
8.1.80.0070.00017.28
8.1.70.0080.00317.29
8.1.60.0000.00817.51
8.1.50.0040.00417.43
8.1.40.0050.00317.51
8.1.30.0030.00517.50
8.1.20.0000.00817.61
8.1.10.0050.00217.34
8.1.00.0040.00417.31
8.0.300.0000.00819.98
8.0.290.0030.00516.75
8.0.280.0000.00718.43
8.0.270.0000.00717.25
8.0.260.0030.00317.41
8.0.250.0070.00016.92
8.0.240.0030.00316.86
8.0.230.0050.00516.89
8.0.220.0040.00416.70
8.0.210.0070.00016.75
8.0.200.0030.00316.90
8.0.190.0040.00416.77
8.0.180.0040.00416.77
8.0.170.0070.00016.85
8.0.160.0070.00016.73
8.0.150.0000.00716.80
8.0.140.0040.00416.65
8.0.130.0000.00513.31
8.0.120.0030.00616.69
8.0.110.0000.00816.79
8.0.100.0050.00216.75
8.0.90.0040.00416.69
8.0.80.0060.00916.74
8.0.70.0040.00416.71
8.0.60.0070.00016.78
8.0.50.0040.00416.72
8.0.30.0080.01016.95
8.0.20.0120.01017.40
8.0.10.0040.00416.83
8.0.00.0100.00716.70
7.4.330.0030.00315.08
7.4.320.0030.00316.53
7.4.300.0000.00616.44
7.4.290.0040.00416.51
7.4.280.0030.00616.38
7.4.270.0030.00316.53
7.4.260.0050.00216.40
7.4.250.0030.00316.39
7.4.240.0050.00316.31
7.4.230.0040.00416.43
7.4.220.0160.00916.37
7.4.210.0060.01016.56
7.4.200.0000.00716.29
7.4.160.0090.00616.39
7.4.150.0100.01617.40
7.4.140.0090.01017.86
7.4.130.0140.00516.41
7.4.120.0100.00716.46
7.4.110.0100.01016.33
7.4.100.0000.01716.45
7.4.90.0100.00716.45
7.4.80.0070.01619.39
7.4.70.0110.00616.50
7.4.60.0150.00916.54
7.4.50.0040.01116.48
7.4.40.0030.01216.34
7.4.30.0130.00616.48
7.4.00.0070.01114.80
7.3.330.0080.00012.93
7.3.320.0060.00012.88
7.3.310.0000.00816.10
7.3.300.0000.00616.12
7.3.290.0070.00816.14
7.3.280.0100.00716.10
7.3.270.0000.01717.40
7.3.260.0120.00716.26
7.3.250.0120.00616.25
7.3.240.0140.00416.27
7.3.230.0080.00816.39
7.3.210.0120.00616.16
7.3.200.0090.00616.50
7.3.190.0150.00316.39
7.3.180.0060.01016.09
7.3.170.0100.00716.16
7.3.160.0090.00616.18
7.2.330.0100.01316.38
7.2.320.0070.01016.54
7.2.310.0090.01216.59
7.2.300.0100.00716.36
7.2.290.0090.00916.38
7.2.60.0080.00516.75
7.1.200.0040.00415.71
7.1.70.0030.00717.05
7.1.60.0100.00017.23
7.1.00.0030.07722.30
7.0.200.0030.00814.82
7.0.100.0030.06319.99
7.0.90.0030.07019.93
7.0.80.0030.06019.98
7.0.70.0130.06719.88
7.0.60.0170.05320.10
7.0.50.0430.05320.41
7.0.40.0370.07020.31
7.0.30.0300.06020.35
7.0.20.0470.05320.37
7.0.10.0330.06020.34
7.0.00.0400.06020.37
5.6.250.0270.07020.69
5.6.240.0030.06320.69
5.6.230.0170.05020.79
5.6.220.0130.06020.73
5.6.210.0100.06320.72
5.6.200.0230.05021.18
5.6.190.0000.07021.08
5.6.180.0130.06021.16
5.6.170.0070.06321.08
5.6.160.0130.05021.11
5.6.150.0170.07321.07
5.6.140.0230.04721.02
5.6.130.0200.05021.10
5.6.120.0130.06021.10
5.6.110.0070.06321.16
5.6.100.0230.05021.09
5.6.90.0130.06321.17
5.6.80.0230.04020.40
5.6.70.0100.05320.45
5.6.60.0100.06320.50
5.6.50.0130.05320.45
5.6.40.0100.05720.43
5.6.30.0100.05720.55
5.6.20.0100.06020.43
5.6.10.0170.07320.36
5.6.00.0170.05720.44

preferences:
82.63 ms | 1484 KiB | 5 Q