3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = new stdClass(); $arr = []; $arr[0] = "abc"; $arr[1] = "aaa"; $json->$arr[0] = $arr[1]; echo 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.0040.01118.77
8.3.30.0070.00718.88
8.3.20.0060.01220.14
8.3.10.0030.00621.94
8.3.00.0080.00023.69
8.2.170.0090.00622.96
8.2.160.0130.00020.51
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0080.00019.89
8.2.120.0080.00026.35
8.2.110.0140.00722.08
8.2.100.0110.00017.84
8.2.90.0080.00019.17
8.2.80.0080.00018.03
8.2.70.0060.00317.63
8.2.60.0000.00917.93
8.2.50.0000.00818.07
8.2.40.0040.00422.23
8.2.30.0040.00419.43
8.2.20.0000.00717.68
8.2.10.0040.00418.12
8.2.00.0050.00218.01
8.1.270.0000.00823.86
8.1.260.0040.00428.09
8.1.250.0090.00028.09
8.1.240.0080.00323.59
8.1.230.0000.01120.96
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0000.00718.10
8.1.170.0100.00018.59
8.1.160.0000.00720.71
8.1.150.0000.00718.87
8.1.140.0070.00319.44
8.1.130.0000.00717.68
8.1.120.0040.00417.47
8.1.110.0000.00717.38
8.1.100.0030.00517.41
8.1.90.0040.00417.38
8.1.80.0050.00217.36
8.1.70.0000.00717.28
8.1.60.0000.00817.41
8.1.50.0030.00517.45
8.1.40.0080.00017.49
8.1.30.0060.00317.57
8.1.20.0000.00817.58
8.1.10.0080.00017.58
8.1.00.0000.00817.38
8.0.300.0030.00618.77
8.0.290.0030.00516.75
8.0.280.0030.00318.50
8.0.270.0070.00017.16
8.0.260.0000.00817.21
8.0.250.0000.00616.91
8.0.240.0000.00817.05
8.0.230.0070.00016.95
8.0.220.0000.00816.94
8.0.210.0000.00816.88
8.0.200.0040.00416.87
8.0.190.0030.00616.96
8.0.180.0000.00816.98
8.0.170.0000.00716.81
8.0.160.0000.00816.89
8.0.150.0060.00316.91
8.0.140.0040.00316.76
8.0.130.0030.00313.35
8.0.120.0000.00816.96
8.0.110.0000.00716.94
8.0.100.0050.00216.85
8.0.90.0030.00516.78
8.0.80.0130.00416.78
8.0.70.0000.00716.86
8.0.60.0040.00416.73
8.0.50.0040.00416.89
8.0.30.0100.00917.25
8.0.20.0100.01017.40
8.0.10.0030.00516.82
8.0.00.0100.00816.65
7.4.330.0000.00516.78
7.4.320.0030.00316.39
7.4.300.0080.00016.43
7.4.290.0000.00616.39
7.4.280.0060.00316.36
7.4.270.0030.00316.43
7.4.260.0110.00016.45
7.4.250.0000.00716.42
7.4.240.0050.00216.48
7.4.230.0030.00316.64
7.4.220.0100.01316.52
7.4.210.0080.00816.50
7.4.200.0020.00516.57
7.4.160.0070.01716.47
7.4.150.0160.00617.40
7.4.140.0140.00817.86
7.4.130.0080.00916.51
7.4.120.0070.01016.45
7.4.110.0140.00316.54
7.4.100.0090.00916.59
7.4.90.0070.01016.45
7.4.80.0080.01219.39
7.4.70.0030.01416.59
7.4.60.0060.01016.43
7.4.50.0030.01016.61
7.4.40.0070.01016.59
7.4.30.0090.01216.48
7.4.00.0080.00815.02
7.3.330.0030.00313.00
7.3.320.0030.00313.16
7.3.310.0000.00716.14
7.3.300.0000.00716.29
7.3.290.0070.00916.36
7.3.280.0080.01216.34
7.3.270.0040.01617.40
7.3.260.0130.00416.38
7.3.250.0080.01116.36
7.3.240.0110.00916.30
7.3.230.0130.00916.69
7.3.210.0100.00716.32
7.3.200.0130.00319.39
7.3.190.0080.00816.40
7.3.180.0100.00616.27
7.3.170.0120.00916.53
7.3.160.0070.01016.30
7.3.120.0070.01315.00
7.3.110.0090.00914.65
7.3.100.0090.00614.59
7.3.90.0090.01215.13
7.3.80.0030.01015.20
7.3.70.0070.00714.84
7.3.60.0080.00314.54
7.3.50.0030.00614.66
7.3.40.0030.00614.55
7.3.30.0110.00414.59
7.3.20.0000.01016.76
7.3.10.0140.00016.64
7.3.00.0100.00316.53
7.2.330.0120.00616.53
7.2.320.0070.01016.47
7.2.310.0120.00616.82
7.2.300.0160.00616.39
7.2.290.0140.00316.82
7.2.250.0110.00414.96
7.2.240.0090.00915.16
7.2.230.0090.01214.73
7.2.220.0080.00615.08
7.2.210.0070.00715.15
7.2.200.0070.00714.98
7.2.190.0060.01015.14
7.2.180.0000.01315.01
7.2.170.0000.01514.93
7.2.60.0080.00316.79
7.2.00.0040.01119.11
7.1.330.0080.00415.56
7.1.320.0060.00315.91
7.1.310.0090.00016.10
7.1.300.0040.01215.85
7.1.290.0030.00815.78
7.1.280.0070.00415.82
7.1.270.0040.01115.91
7.1.260.0040.00915.98
7.1.200.0030.01015.65
7.1.100.0100.00718.14
7.1.70.0000.00717.12
7.1.60.0100.00719.30
7.1.50.0030.01916.96
7.1.00.0000.08022.43
7.0.200.0030.00616.83
7.0.90.0670.08719.84
7.0.80.0600.07719.94
7.0.70.0430.05320.10
7.0.60.0570.05019.72
7.0.50.0430.05320.38
7.0.40.0000.08319.96
7.0.30.0130.03720.13
7.0.20.0130.07020.13
7.0.10.0000.05320.14
7.0.00.0070.08019.98
5.6.280.0000.06321.08
5.6.240.0000.08720.53
5.6.230.0070.06720.54
5.6.220.0070.04320.57
5.6.210.0000.04720.53
5.6.200.0070.06321.02
5.6.190.0130.04721.13
5.6.180.0030.04321.07
5.6.170.0070.08321.02
5.6.160.0230.06721.02
5.6.150.0100.05021.05
5.6.140.0070.08721.17
5.6.130.0070.07021.07
5.6.120.0130.08020.93
5.6.110.0070.08721.04
5.6.100.0070.08320.97
5.6.90.0270.06321.06
5.6.80.0070.08320.40
5.6.70.0070.08020.41
5.6.60.0100.07020.30
5.6.50.0100.08320.40
5.6.40.0030.07720.34
5.6.30.0200.07020.40
5.6.20.0070.05320.38
5.6.10.0030.09020.39
5.6.00.0030.07020.36
5.5.380.0030.09020.27
5.5.370.0170.07320.49
5.5.360.0030.04320.45
5.5.350.0030.08020.34
5.5.340.0100.03720.90
5.5.330.0070.07720.92
5.5.320.0170.04720.77
5.5.310.0070.05320.92
5.5.300.0070.04720.87
5.5.290.0100.08320.88
5.5.280.0170.04020.88
5.5.270.0070.05320.84
5.5.260.0100.09020.70
5.5.250.0130.07020.67
5.5.240.0170.07020.24
5.5.230.0170.06719.98
5.5.220.0070.07320.11
5.5.210.0070.05320.29
5.5.200.0100.05020.25
5.5.190.0100.08320.10
5.5.180.0070.05720.11
5.5.160.0100.05720.20
5.5.150.0230.05320.09
5.5.140.0070.08020.23
5.5.130.0170.06720.25
5.5.120.0000.05020.11
5.5.110.0070.04319.98
5.5.100.0100.08720.13
5.5.90.0070.07020.06
5.5.80.0030.08720.09
5.5.70.0170.06020.10
5.5.60.0070.07720.08
5.5.50.0130.07320.04
5.5.40.0070.05720.01
5.5.30.0130.05720.05
5.5.20.0230.06320.05
5.5.10.0270.06020.04
5.5.00.0130.07020.01

preferences:
40.21 ms | 400 KiB | 5 Q