3v4l.org

run code in 300+ PHP versions simultaneously
<?php // depth 1 $a = []; // depth 2 $b = new \stdClass(); $b->x = $a; // depth 3 $c = new \stdClass(); $c->x = [$a]; var_export(json_encode($a, 0, 0)); echo "\n"; var_export(json_encode($b, 0, 1)); echo "\n"; var_export(json_encode($c, 0, 2));

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.4.120.0080.00124.18
8.4.110.0130.00419.00
8.4.100.0120.00818.89
8.4.90.0130.00820.40
8.4.80.0050.00418.02
8.4.70.0080.00917.91
8.4.60.0070.00918.88
8.4.50.0030.00517.94
8.4.40.0080.00017.73
8.4.30.0130.00620.63
8.4.20.0070.01019.87
8.4.10.0050.00517.71
8.3.250.0090.00718.88
8.3.240.0130.00317.18
8.3.230.0110.00916.47
8.3.220.0150.00417.13
8.3.210.0080.00616.53
8.3.200.0040.00516.84
8.3.190.0150.00718.98
8.3.180.0090.00316.46
8.3.170.0120.00616.75
8.3.160.0090.00017.36
8.3.150.0160.00317.31
8.3.140.0080.00016.41
8.3.130.0060.00316.57
8.3.120.0040.01220.81
8.3.110.0040.00420.94
8.3.100.0040.00416.38
8.3.90.0040.00426.77
8.3.80.0030.00616.53
8.3.70.0120.00316.58
8.3.60.0150.00616.63
8.3.50.0130.00318.15
8.3.40.0070.00719.21
8.3.30.0070.00718.71
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0110.00720.60
8.2.280.0150.00421.96
8.2.270.0090.00017.53
8.2.260.0070.00718.87
8.2.250.0070.01116.49
8.2.240.0040.00417.42
8.2.230.0030.00722.58
8.2.220.0050.00324.06
8.2.210.0060.00326.77
8.2.200.0060.00316.25
8.2.190.0110.01116.75
8.2.180.0120.00325.92
8.2.170.0140.00718.96
8.2.160.0140.00422.96
8.2.150.0070.00025.66
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0000.00826.16
8.2.110.0030.00720.93
8.2.100.0060.00617.93
8.2.90.0050.00319.30
8.2.80.0050.00317.97
8.2.70.0080.00548.48
8.2.60.0070.00748.63
8.2.50.0090.00448.70
8.2.40.0060.00648.77
8.2.30.0100.00248.54
8.2.20.0060.00549.39
8.2.10.0050.00748.60
8.2.00.0080.00349.33
8.1.330.0060.00621.59
8.1.320.0090.00915.94
8.1.310.0090.00016.77
8.1.300.0090.00018.68
8.1.290.0060.00330.84
8.1.280.0060.00925.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00419.10
8.1.230.0080.00319.02
8.1.220.0000.00817.76
8.1.210.0000.00918.77
8.1.200.0080.00548.34
8.1.190.0050.00748.28
8.1.180.0090.00348.71
8.1.170.0080.00648.94
8.1.160.0070.00549.14
8.1.150.0090.00348.98
8.1.140.0090.00348.40
8.1.130.0100.00248.33
8.1.120.0120.00048.36
8.1.110.0080.00348.36
8.1.100.0040.00848.34
8.1.90.0090.00348.41
8.1.80.0090.00548.39
8.1.70.0100.00248.37
8.1.60.0090.00448.47
8.1.50.0090.00648.38
8.1.40.0090.00448.45
8.1.30.0060.00748.53
8.1.20.0080.00533.04
8.1.10.0130.00048.44
8.1.00.0070.00648.37
8.0.300.0040.00418.77
8.0.290.0060.00647.98
8.0.280.0080.00448.91
8.0.270.0080.00448.04
8.0.260.0080.00348.04
8.0.250.0080.00448.10
8.0.240.0110.00248.10
8.0.230.0070.00548.15
8.0.220.0050.00648.13
8.0.210.0050.00748.10
8.0.200.0050.00748.17
8.0.190.0080.00448.15
8.0.180.0100.00348.15
8.0.170.0070.00548.07
8.0.160.0060.00648.11
8.0.150.0100.00248.08
8.0.140.0080.00448.04
8.0.130.0080.00346.33
8.0.120.0100.00348.08
8.0.110.0060.00329.38
8.0.100.0060.00537.68
8.0.90.0060.00437.72
8.0.80.0070.00437.66
8.0.70.0070.00537.73
8.0.60.0050.00537.65
8.0.50.0070.00437.73
8.0.30.0080.00337.64
8.0.20.0070.00437.73
8.0.10.0100.00137.80
8.0.00.0070.00537.76
7.4.330.0070.00147.44
7.4.320.0120.00047.88
7.4.300.0090.00247.93
7.4.290.0070.00547.85
7.4.280.0060.00537.43
7.4.270.0090.00347.95
7.4.260.0070.00346.34
7.4.250.0050.00647.88
7.4.240.0030.00737.47
7.4.230.0080.00137.48
7.4.220.0030.00737.53
7.4.210.0090.00137.52
7.4.200.0030.00737.44
7.4.190.0020.00837.50
7.4.180.0050.00537.51
7.4.160.0040.00637.46
7.4.150.0070.00337.44
7.4.140.0050.00537.41
7.4.130.0060.00437.41
7.4.120.0070.00337.43
7.4.110.0030.00737.40
7.4.100.0070.00337.43
7.4.90.0060.00437.45
7.4.80.0040.00637.42
7.4.70.0090.00137.42
7.4.60.0060.00637.41
7.4.50.0040.00537.40
7.4.40.0060.00437.34
7.4.30.0030.00737.44
7.4.20.0060.00337.42
7.4.10.0060.00437.40
7.4.00.0070.00337.48
7.3.330.0050.00547.78
7.3.320.0090.00146.21
7.3.310.0100.00037.25
7.3.300.0060.00437.33
7.3.290.0050.00537.26
7.3.280.0070.00337.26
7.3.270.0060.00437.32
7.3.260.0050.00437.27
7.3.250.0050.00537.29
7.3.240.0070.00237.27
7.3.230.0070.00237.35
7.3.220.0050.00537.31
7.3.210.0090.00137.27
7.3.200.0060.00437.18
7.3.190.0060.00537.21
7.3.180.0050.00537.26
7.3.170.0040.00637.19
7.3.160.0060.00437.30
7.3.150.0050.00437.24
7.3.140.0040.00637.24
7.3.130.0070.00337.28
7.3.120.0010.00837.28
7.3.110.0060.00437.20
7.3.100.0060.00437.26
7.3.90.0050.00437.42
7.3.80.0050.00637.25
7.3.70.0080.00237.33
7.3.60.0050.00537.43
7.3.50.0040.00637.42
7.3.40.0060.00337.33
7.3.30.0060.00337.41
7.3.20.0080.00238.52
7.3.10.0080.00338.55
7.3.00.0070.00238.49

preferences:
20.75 ms | 403 KiB | 5 Q