3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ["a","b","c"]; var_dump(json_encode($arr1)); $arr2 = [1=>"A", 3=>"b", 4=>"c"]; var_dump(json_encode($arr2));

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.0140.01016.50
8.3.50.0120.00618.11
8.3.40.0110.01118.64
8.3.30.0040.01118.46
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0120.00325.92
8.2.170.0170.00318.79
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0080.00026.16
8.2.110.0060.00322.10
8.2.100.0080.00419.39
8.2.90.0040.00417.50
8.2.80.0060.00318.78
8.2.70.0050.00317.50
8.2.60.0040.00417.80
8.2.50.0050.00318.05
8.2.40.0040.00419.88
8.2.30.0000.00717.94
8.2.20.0000.00717.89
8.2.10.0050.00319.14
8.2.00.0040.00419.16
8.1.280.0100.00725.92
8.1.270.0050.00223.99
8.1.260.0040.00426.35
8.1.250.0020.00528.09
8.1.240.0000.00920.41
8.1.230.0070.00417.70
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.10
8.1.180.0050.00318.10
8.1.170.0050.00318.76
8.1.160.0060.00319.00
8.1.150.0040.00418.81
8.1.140.0000.00720.57
8.1.130.0030.00320.03
8.1.120.0000.00717.41
8.1.110.0060.00317.36
8.1.100.0070.00017.27
8.1.90.0070.00017.29
8.1.80.0070.00317.28
8.1.70.0040.00417.28
8.1.60.0000.00817.41
8.1.50.0050.00317.33
8.1.40.0000.00817.47
8.1.30.0080.00017.54
8.1.20.0050.00317.48
8.1.10.0040.00417.40
8.1.00.0040.00417.23
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.62
8.0.270.0000.00717.87
8.0.260.0030.00518.43
8.0.250.0000.00716.85
8.0.240.0030.00316.86
8.0.230.0030.00316.84
8.0.220.0000.00716.86
8.0.210.0040.00416.80
8.0.200.0070.00016.82
8.0.190.0060.00316.83
8.0.180.0040.00416.80
8.0.170.0030.00616.84
8.0.160.0030.00616.82
8.0.150.0050.00216.82
8.0.140.0030.00516.75
8.0.130.0000.00713.18
8.0.120.0040.00416.84
8.0.110.0000.00716.71
8.0.100.0070.00016.85
8.0.90.0030.00516.67
8.0.80.0110.00516.77
8.0.70.0040.00416.81
8.0.60.0040.00416.77
8.0.50.0060.00316.61
8.0.30.0220.01216.66
8.0.20.0230.00816.80
8.0.10.0230.01016.79
8.0.00.0230.00616.83
7.4.330.0000.00515.55
7.4.320.0030.00316.43
7.4.300.0040.00416.55
7.4.290.0000.00716.36
7.4.280.0080.00016.53
7.4.270.0040.00416.43
7.4.260.0000.00513.18
7.4.250.0030.00316.39
7.4.240.0000.00716.36
7.4.230.0080.00016.56
7.4.220.0000.00716.25
7.4.210.0070.00716.43
7.4.200.0030.00316.61
7.4.160.0190.00916.41
7.4.150.0240.00816.31
7.4.140.0140.01216.36
7.4.130.0180.00916.29
7.4.120.0210.00716.30
7.4.110.0190.01016.26
7.4.100.0200.00816.31
7.4.90.0240.01016.33
7.4.80.0220.01016.39
7.4.70.0190.01416.30
7.4.60.0150.01616.24
7.4.50.0280.00716.23
7.4.40.0230.00916.21
7.4.30.0200.01316.37
7.4.20.0190.01016.25
7.4.10.0150.01116.34
7.4.00.0240.00716.31
7.3.330.0090.00315.97
7.3.320.0060.00012.93
7.3.310.0030.00316.13
7.3.300.0000.00616.00
7.3.290.0090.00616.17
7.3.280.0220.00416.01
7.3.270.0220.00816.02
7.3.260.0180.01016.08
7.3.250.0200.00816.11
7.3.240.0170.01016.07
7.3.230.0210.00816.06
7.3.220.0170.01316.05
7.3.210.0250.00516.07
7.3.200.0240.00615.98
7.3.190.0220.00516.04
7.3.180.0220.00716.06
7.3.170.0210.00616.06
7.3.160.0210.00916.10
7.3.150.0210.00616.02
7.3.140.0180.01015.97
7.3.130.0260.00416.06
7.3.120.0180.01016.06
7.3.110.0210.00915.95
7.3.100.0220.00915.94
7.3.90.0180.00916.27
7.3.80.0170.01416.04
7.3.70.0240.00516.14
7.3.60.0210.01016.12
7.3.50.0260.01016.17
7.3.40.0250.00616.26
7.3.30.0190.00916.21
7.3.20.0240.00616.24
7.3.10.0200.00716.19
7.3.00.0210.01016.13

preferences:
79.39 ms | 401 KiB | 5 Q