3v4l.org

run code in 300+ PHP versions simultaneously
<?php class JsonSerializer { public static function serialize($value) { var_dump($value); } public function __call($method, $args) { if ('serialize' !== strtolower($method)) { throw new \BadMethodCallException('Call to undefined method '.__CLASS__."::$method()"); } return self::serialize(...$args); } } JsonSerializer::serialize('foo'); (new JsonSerializer())->serialize('bar'); try { (new JsonSerializer())->baz('qux'); } catch (\Exception $e) { var_dump($e->getMessage()); }

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.63
8.3.50.0070.00716.09
8.3.40.0100.01018.98
8.3.30.0070.00718.58
8.3.20.0040.00420.21
8.3.10.0030.00623.70
8.3.00.0040.00419.79
8.2.180.0170.00318.41
8.2.170.0130.00322.96
8.2.160.0090.00618.98
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0040.00419.32
8.2.120.0000.00826.35
8.2.110.0050.00519.23
8.2.100.0080.00417.72
8.2.90.0000.00718.22
8.2.80.0080.00017.97
8.2.70.0000.00917.90
8.2.60.0030.00517.93
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0000.00817.99
8.2.20.0040.00417.94
8.2.10.0050.00318.10
8.2.00.0040.00418.06
8.1.280.0040.01125.92
8.1.270.0080.00022.06
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0110.00022.48
8.1.230.0130.00020.92
8.1.220.0040.00417.74
8.1.210.0050.00318.96
8.1.200.0070.00317.48
8.1.190.0090.00017.35
8.1.180.0060.00318.10
8.1.170.0090.00018.48
8.1.160.0040.00418.90
8.1.150.0000.00820.67
8.1.140.0030.00719.59
8.1.130.0000.00817.46
8.1.120.0020.00517.53
8.1.110.0000.00817.41
8.1.100.0030.00617.36
8.1.90.0030.00617.50
8.1.80.0050.00317.46
8.1.70.0000.00717.38
8.1.60.0030.00617.55
8.1.50.0030.00617.54
8.1.40.0070.00317.57
8.1.30.0000.00817.58
8.1.20.0040.00417.63
8.1.10.0000.00817.64
8.1.00.0070.00017.41
8.0.300.0060.00320.07
8.0.290.0040.00416.75
8.0.280.0070.00018.42
8.0.270.0080.00017.31
8.0.260.0070.00016.93
8.0.250.0030.00316.98
8.0.240.0030.00316.98
8.0.230.0050.00317.07
8.0.220.0000.00616.93
8.0.210.0000.00716.87
8.0.200.0050.00317.04
8.0.190.0060.00316.94
8.0.180.0040.00416.99
8.0.170.0050.00316.91
8.0.160.0040.00417.03
8.0.150.0040.00416.93
8.0.140.0000.00716.89
8.0.130.0000.00513.43
8.0.120.0000.00716.86
8.0.110.0030.00516.83
8.0.100.0040.00416.82
8.0.90.0050.00516.97
8.0.80.0080.01216.92
8.0.70.0020.00517.07
8.0.60.0030.00516.83
8.0.50.0040.00417.02
8.0.30.0100.00917.03
8.0.20.0130.00717.40
8.0.10.0000.00716.94
8.0.00.0070.01116.79
7.4.330.0060.00015.55
7.4.320.0070.00016.58
7.4.300.0000.00616.58
7.4.290.0000.00716.38
7.4.280.0000.00716.52
7.4.270.0000.00716.44
7.4.260.0070.00016.37
7.4.250.0030.00316.58
7.4.240.0070.00016.62
7.4.230.0030.00316.65
7.4.220.0100.01716.49
7.4.210.0070.01116.65
7.4.200.0040.00316.56
7.4.160.0100.00816.37
7.4.150.0150.01217.40
7.4.140.0160.00517.86
7.4.130.0090.01016.65
7.4.120.0130.00816.51
7.4.110.0090.00916.34
7.4.100.0140.01016.34
7.4.90.0140.00316.45
7.4.80.0150.00919.39
7.4.70.0030.01616.52
7.4.60.0060.00916.71
7.4.50.0120.00316.52
7.4.40.0120.00616.39
7.4.30.0080.00716.51
7.4.00.0030.01315.13
7.3.330.0050.00013.25
7.3.320.0000.00513.39
7.3.310.0000.00716.32
7.3.300.0070.00016.31
7.3.290.0020.01116.43
7.3.280.0090.00616.40
7.3.270.0090.00917.40
7.3.260.0040.01416.54
7.3.250.0080.00916.58
7.3.240.0100.00816.39
7.3.230.0130.01016.41
7.3.210.0100.00716.39
7.3.200.0040.01716.32
7.3.190.0100.00616.59
7.3.180.0100.01016.68
7.3.170.0060.01016.44
7.3.160.0110.01116.50
7.3.120.0060.00914.94
7.3.110.0080.00614.91
7.3.100.0000.01014.68
7.3.90.0030.01014.88
7.3.80.0110.00414.84
7.3.70.0110.00014.80
7.3.60.0030.01014.75
7.3.50.0070.00714.88
7.3.40.0030.00714.84
7.3.30.0160.00014.63
7.3.20.0070.00416.84
7.3.10.0090.00616.70
7.3.00.0030.01016.43
7.2.330.0030.01416.78
7.2.320.0030.01616.72
7.2.310.0110.00616.64
7.2.300.0100.01316.37
7.2.290.0190.00316.70
7.2.240.0000.00915.00
7.2.230.0120.00615.16
7.2.220.0000.01014.93
7.2.210.0000.01514.83
7.2.200.0110.00314.96
7.2.190.0100.00314.76
7.2.180.0130.00014.76
7.2.170.0030.01315.00
7.2.160.0100.00714.88
7.2.150.0060.00616.93
7.2.140.0040.01216.90
7.2.130.0090.00616.80
7.2.120.0040.01116.89
7.2.110.0040.01216.95
7.2.100.0070.01116.96
7.2.90.0090.00616.78
7.2.80.0070.00716.98
7.2.70.0060.00916.53
7.2.60.0080.00616.80
7.2.50.0060.00616.99
7.2.40.0070.00316.85
7.2.30.0130.00316.97
7.2.20.0060.00617.01
7.2.10.0060.00916.59
7.2.00.0000.01516.90
7.1.330.0030.00915.54
7.1.320.0090.00615.71
7.1.310.0060.00915.93
7.1.300.0050.00515.49
7.1.290.0070.00315.56
7.1.280.0000.01415.82
7.1.270.0000.01015.77
7.1.260.0040.00415.48
7.1.250.0040.01115.87
7.1.200.0040.00415.57
7.1.70.0030.00717.33
7.1.60.0150.00316.96
7.1.50.0030.01317.05
7.1.40.0070.01716.66
7.1.30.0110.00416.91
7.1.20.0080.00416.89
7.1.10.0030.00616.66
7.1.00.0030.00516.86
7.0.200.0100.00316.85
7.0.190.0000.01016.81
7.0.180.0030.01016.66
7.0.170.0040.00716.66
7.0.160.0080.00016.66
7.0.150.0030.00616.66
7.0.140.0030.00616.66
7.0.130.0060.00616.66
7.0.120.0040.00716.66
7.0.110.0050.00316.66
7.0.100.0050.00216.66
7.0.90.0030.00616.66
7.0.80.0000.00716.66
7.0.70.0040.00416.66
7.0.60.0030.00616.66
7.0.50.0050.00516.67
7.0.40.0090.00916.66
7.0.30.0040.00716.66
7.0.20.0050.00316.66
7.0.10.0030.00616.66
7.0.00.0030.02016.66

preferences:
48.03 ms | 400 KiB | 5 Q