3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements JsonSerializable { private $thing; public function __construct($thing) { $this->thing = $thing; } public function jsonSerialize() { return [ 'thing' => $this->thing, ]; } } $foo = new Foo('Foo Bar'); echo json_encode(['the_foo' => $foo]);

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.00418.55
8.3.50.0070.01017.99
8.3.40.0150.00618.73
8.3.30.0120.00918.79
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0150.00025.92
8.2.170.0150.00318.73
8.2.160.0110.00422.96
8.2.150.0080.00025.66
8.2.140.0060.00324.66
8.2.130.0050.00226.16
8.2.120.0040.00420.58
8.2.110.0140.00319.38
8.2.100.0040.01217.87
8.2.90.0030.00619.11
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0060.00318.16
8.2.30.0000.00818.19
8.2.20.0090.00017.97
8.2.10.0000.00719.20
8.2.00.0030.00519.18
8.1.280.0110.00425.92
8.1.270.0030.00523.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0150.00417.78
8.1.230.0040.00819.00
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0050.00318.70
8.1.160.0000.00718.85
8.1.150.0000.00719.00
8.1.140.0040.00418.89
8.1.130.0000.00720.02
8.1.120.0000.00717.37
8.1.110.0050.00317.46
8.1.100.0040.00417.35
8.1.90.0060.00317.36
8.1.80.0000.00817.34
8.1.70.0000.00817.45
8.1.60.0030.00617.42
8.1.50.0040.00417.50
8.1.40.0090.00017.45
8.1.30.0040.00417.70
8.1.20.0000.00817.63
8.1.10.0040.00417.50
8.1.00.0040.00417.41
8.0.300.0030.00518.77
8.0.290.0070.00316.75
8.0.280.0070.00018.45
8.0.270.0030.00318.06
8.0.260.0000.00718.45
8.0.250.0000.00616.96
8.0.240.0030.00616.97
8.0.230.0070.00016.88
8.0.220.0030.00316.97
8.0.210.0000.00716.88
8.0.200.0000.00716.82
8.0.190.0070.00016.99
8.0.180.0070.00016.91
8.0.170.0060.00316.97
8.0.160.0050.00316.79
8.0.150.0000.00716.88
8.0.140.0030.00616.74
8.0.130.0030.00313.29
8.0.120.0080.00016.88
8.0.110.0040.00416.79
8.0.100.0040.00417.01
8.0.90.0080.00016.77
8.0.80.0050.01416.84
8.0.70.0050.00316.84
8.0.60.0030.00516.88
8.0.50.0050.00217.01
8.0.30.0090.01217.40
8.0.20.0090.00917.16
8.0.10.0040.00416.87
8.0.00.0120.00816.90
7.4.330.0060.00015.55
7.4.320.0030.00316.63
7.4.300.0030.00316.52
7.4.290.0030.00316.63
7.4.280.0080.00016.64
7.4.270.0000.00716.45
7.4.260.0030.00313.20
7.4.250.0000.00816.57
7.4.240.0000.00716.61
7.4.230.0030.00316.68
7.4.220.0000.00716.63
7.4.210.0050.01016.63
7.4.200.0000.00716.68
7.4.130.0110.00716.42
7.4.120.0100.01016.36
7.4.110.0090.00916.38
7.4.100.0060.01116.64
7.4.90.0110.00616.56
7.4.80.0060.01216.59
7.4.70.0210.01216.38
7.4.60.0250.00516.46
7.4.50.0280.00316.41
7.4.40.0270.00416.33
7.4.30.0240.01116.38
7.4.20.0250.00516.33
7.4.10.0220.00916.39
7.4.00.0090.01216.18
7.3.330.0070.00016.23
7.3.320.0000.00813.22
7.3.310.0050.00316.38
7.3.300.0030.00316.36
7.3.290.0090.00516.32
7.3.260.0230.00316.34
7.3.240.0130.00516.33
7.3.230.0150.00616.42
7.3.210.0130.00416.34
7.3.200.0070.01419.39
7.3.190.0220.01316.41
7.3.180.0200.00516.45
7.3.170.0270.00416.44
7.3.160.0180.01416.24
7.3.150.0290.00516.42
7.3.140.0230.01116.36
7.3.130.0210.01116.37
7.3.120.0170.01716.35
7.3.110.0290.00116.47
7.3.100.0260.00516.23
7.3.90.0210.00916.39
7.3.80.0240.00916.39
7.3.70.0200.01016.31
7.3.60.0200.01116.35
7.3.50.0170.01316.27
7.3.40.0220.00816.28
7.3.30.0270.00516.28
7.3.20.0210.01116.30
7.3.10.0220.01416.36
7.3.00.0160.01616.30
7.2.330.0100.00716.73
7.2.320.0160.00616.40
7.2.310.0240.00916.43
7.2.300.0260.00816.60
7.2.290.0240.00816.61
7.2.280.0220.00916.75
7.2.270.0210.01016.59
7.2.260.0230.00816.56
7.2.250.0160.01616.62
7.2.240.0240.00616.58
7.2.230.0210.00916.38
7.2.220.0280.00316.42
7.2.210.0240.00516.66
7.2.200.0280.00416.52
7.2.190.0250.00816.58
7.2.180.0180.01216.59
7.2.170.0260.00616.63
7.2.160.0290.00616.56
7.2.150.0270.00916.60
7.2.140.0280.00816.59
7.2.130.0150.01416.63
7.2.120.0220.01116.47
7.2.110.0170.01216.59
7.2.100.0200.01216.60
7.2.90.0260.00816.51
7.2.80.0190.01416.49
7.2.70.0250.00716.49
7.2.60.0480.01116.62
7.2.50.0200.01016.63
7.2.40.0230.00816.57
7.2.30.0160.01316.48
7.2.20.0180.01116.56
7.2.10.0150.01316.58
7.2.00.0190.01016.62

preferences:
59.67 ms | 401 KiB | 5 Q