3v4l.org

run code in 300+ PHP versions simultaneously
<?php // depth 1 $a = new \stdClass(); // 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.3.60.0140.00016.61
8.3.50.0000.01417.82
8.3.40.0140.00419.21
8.3.30.0090.00618.52
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0070.01425.92
8.2.170.0120.00322.96
8.2.160.0100.00322.96
8.2.150.0150.00025.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0100.00020.62
8.2.110.0090.00020.34
8.2.100.0060.00617.78
8.2.90.0150.00617.69
8.2.80.0190.00417.90
8.2.70.0180.00438.03
8.2.60.0180.00238.20
8.2.50.0160.00338.17
8.2.40.0140.00538.87
8.2.30.0120.00638.29
8.2.20.0120.00538.70
8.2.10.0140.00638.16
8.2.00.0090.00838.65
8.1.280.0110.00325.92
8.1.270.0060.00323.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.01322.04
8.1.230.0000.01123.89
8.1.220.0120.00617.48
8.1.210.0130.00418.00
8.1.200.0140.00437.80
8.1.190.0140.00337.89
8.1.180.0110.00838.70
8.1.170.0180.00138.30
8.1.160.0150.00338.44
8.1.150.0110.00838.29
8.1.140.0150.00338.02
8.1.130.0100.00837.94
8.1.120.0120.00632.88
8.1.110.0150.00432.86
8.1.100.0090.00832.88
8.1.90.0110.00632.79
8.1.80.0110.00632.80
8.1.70.0080.00932.86
8.1.60.0180.00132.91
8.1.50.0070.01132.89
8.1.40.0140.00532.94
8.1.30.0110.00832.98
8.1.20.0080.00521.01
8.1.10.0140.00432.94
8.1.00.0150.00432.87
8.0.300.0040.00617.79
8.0.290.0090.00337.63
8.0.280.0130.00538.17
8.0.270.0130.00538.05
8.0.260.0130.00437.68
8.0.250.0110.00432.54
8.0.240.0140.00532.46
8.0.230.0100.00732.48
8.0.220.0140.00232.46
8.0.210.0130.00532.48
8.0.200.0100.00732.50
8.0.190.0130.00432.47
8.0.180.0110.00632.47
8.0.170.0130.00432.42
8.0.160.0110.00532.47
8.0.150.0140.00432.46
8.0.140.0150.00232.47
8.0.130.0130.00431.60
8.0.120.0120.00528.66
8.0.110.0090.00323.39
8.0.100.0080.00423.36
8.0.90.0070.00523.35
8.0.80.0080.00423.43
8.0.70.0090.00323.41
8.0.60.0070.00523.39
8.0.50.0100.00323.36
8.0.30.0070.00523.34
8.0.20.0070.00523.46
8.0.10.0080.00323.50
8.0.00.0060.00523.51
7.4.330.0060.00637.22
7.4.320.0090.00532.18
7.4.300.0100.00432.23
7.4.290.0120.00432.16
7.4.280.0110.00429.11
7.4.270.0090.00532.20
7.4.260.0130.00231.34
7.4.250.0070.00728.40
7.4.240.0080.00423.14
7.4.230.0080.00423.17
7.4.220.0040.00723.17
7.4.210.0070.00523.14
7.4.200.0070.00423.20
7.4.190.0090.00323.21
7.4.180.0080.00423.26
7.4.160.0080.00423.21
7.4.150.0080.00323.14
7.4.140.0070.00523.12
7.4.130.0080.00323.14
7.4.120.0080.00323.08
7.4.110.0080.00423.07
7.4.100.0090.00223.11
7.4.90.0050.00623.07
7.4.80.0070.00523.11
7.4.70.0100.00223.08
7.4.60.0050.00623.11
7.4.50.0080.00423.03
7.4.40.0090.00323.04
7.4.30.0060.00423.09
7.4.20.0070.00423.06
7.4.10.0060.00523.10
7.4.00.0070.00423.14
7.3.330.0120.00332.16
7.3.320.0120.00427.76
7.3.310.0070.00422.96
7.3.300.0080.00322.99
7.3.290.0070.00422.94
7.3.280.0070.00522.94
7.3.270.0060.00622.97
7.3.260.0060.00522.92
7.3.250.0050.00622.98
7.3.240.0070.00322.94
7.3.230.0060.00422.98
7.3.220.0070.00422.93
7.3.210.0070.00522.93
7.3.200.0070.00522.96
7.3.190.0070.00422.94
7.3.180.0090.00222.92
7.3.170.0070.00422.94
7.3.160.0050.00622.93
7.3.150.0080.00322.91
7.3.140.0090.00322.92
7.3.130.0080.00422.87
7.3.120.0060.00422.91
7.3.110.0090.00222.88
7.3.100.0080.00422.88
7.3.90.0080.00323.12
7.3.80.0060.00522.96
7.3.70.0070.00423.06
7.3.60.0070.00523.12
7.3.50.0070.00423.08
7.3.40.0080.00323.12
7.3.30.0060.00523.10
7.3.20.0080.00424.51
7.3.10.0090.00424.50
7.3.00.0080.00424.54

preferences:
42.15 ms | 400 KiB | 5 Q