3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 簡単なクラスを宣言 class TestClass { public $foo; private $debug = false; public function __construct($foo) { $this->foo = $foo; } public function myDo() { return $this->debug; } public function __destruct() { if($this->debug) { echo "YES!!"; } } } $class = new TestClass('Hello'); //$ser = serialize($class); $ser = serialize("O:9:&quot;TestClass&quot;:2:{s:14:&quot;TestClassfoo&quot;;s:5:&quot;Hello&quot;;s:16:&quot;TestClassdebug&quot;;b:0;}"); $deser = unserialize($ser); if ($deser === FALSE) { echo "error."; } echo $class->foo; print ((true === $class->myDo()) ? 'true' : 'false' ). PHP_EOL; //echo $class->debug; //echo htmlspecialchars(serialize($deser)); ?>

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.0040.01218.68
8.3.50.0120.00319.70
8.3.40.0070.01118.84
8.3.30.0140.00018.85
8.3.20.0000.00720.30
8.3.10.0080.00023.70
8.3.00.0040.00419.78
8.2.180.0100.01018.53
8.2.170.0110.00422.96
8.2.160.0140.00018.94
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00719.19
8.2.120.0040.00426.35
8.2.110.0060.00322.20
8.2.100.0120.00317.72
8.2.90.0080.00017.91
8.2.80.0050.00319.21
8.2.70.0000.00817.80
8.2.60.0040.00417.80
8.2.50.0000.00918.10
8.2.40.0040.00420.45
8.2.30.0000.00719.13
8.2.20.0030.00318.00
8.2.10.0080.00018.06
8.2.00.0070.00018.21
8.1.280.0040.01125.92
8.1.270.0050.00320.32
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00622.14
8.1.230.0100.00020.91
8.1.220.0060.00317.74
8.1.210.0030.00618.77
8.1.200.0050.00517.35
8.1.190.0030.00617.65
8.1.180.0000.00718.10
8.1.170.0030.00518.94
8.1.160.0040.00418.95
8.1.150.0000.00720.19
8.1.140.0000.00717.63
8.1.130.0000.00820.70
8.1.120.0030.00317.46
8.1.110.0080.00017.32
8.1.100.0040.00417.46
8.1.90.0040.00417.36
8.1.80.0000.00817.51
8.1.70.0050.00517.46
8.1.60.0070.00017.60
8.1.50.0030.00617.57
8.1.40.0000.00817.53
8.1.30.0030.00617.70
8.1.20.0080.00017.64
8.1.10.0040.00417.57
8.1.00.0060.00317.49
8.0.300.0000.00920.14
8.0.290.0070.00016.88
8.0.280.0040.00418.37
8.0.270.0040.00417.18
8.0.260.0030.00316.83
8.0.250.0050.00316.95
8.0.240.0040.00416.98
8.0.230.0040.00416.85
8.0.220.0030.00316.91
8.0.210.0030.00316.92
8.0.200.0030.00316.94
8.0.190.0000.00816.85
8.0.180.0040.00416.93
8.0.170.0030.00516.88
8.0.160.0080.00016.86
8.0.150.0000.00816.84
8.0.140.0000.00816.77
8.0.130.0030.00313.25
8.0.120.0000.00716.79
8.0.110.0070.00016.92
8.0.100.0040.00416.78
8.0.90.0040.00416.68
8.0.80.0150.00016.85
8.0.70.0000.00716.86
8.0.60.0040.00416.82
8.0.50.0040.00416.61
8.0.30.0120.00816.95
8.0.20.0100.01217.40
8.0.10.0000.00716.86
8.0.00.0140.00716.76
7.4.330.0000.00516.69
7.4.320.0030.00316.58
7.4.300.0000.00616.61
7.4.290.0070.00016.50
7.4.280.0080.00016.53
7.4.270.0030.00316.50
7.4.260.0040.00416.49
7.4.250.0040.00416.60
7.4.240.0000.00716.66
7.4.230.0050.00316.63
7.4.220.0040.00416.61
7.4.210.0080.00716.57
7.4.200.0000.00716.32
7.4.160.0080.00916.66
7.4.150.0130.00617.40
7.4.140.0080.01117.86
7.4.130.0100.01016.64
7.4.120.0080.00916.49
7.4.110.0130.00416.46
7.4.100.0130.01316.62
7.4.90.0070.01016.59
7.4.80.0090.00919.39
7.4.70.0100.01316.52
7.4.60.0090.00616.50
7.4.50.0090.00916.59
7.4.40.0120.00616.56
7.4.00.0000.01314.91
7.3.330.0000.00513.23
7.3.320.0030.00313.38
7.3.310.0070.00016.40
7.3.300.0030.00316.38
7.3.290.0070.00016.29
7.3.280.0100.00416.40
7.3.270.0060.01517.40
7.3.260.0100.01016.51
7.3.250.0120.00416.42
7.3.240.0100.00816.55
7.3.230.0140.00916.50
7.3.210.0090.00916.37
7.3.200.0120.00916.32
7.3.190.0130.00316.36
7.3.180.0000.01716.45
7.3.170.0180.00316.43
7.3.160.0120.00316.33
7.2.330.0110.00716.45
7.2.320.0130.00316.62
7.2.310.0100.00716.82
7.2.300.0100.00616.46
7.2.290.0100.00716.87
7.2.60.0070.00717.04
7.2.20.0520.01117.76
7.2.10.0340.00717.77
7.2.00.0310.01117.71
7.1.200.0060.00615.57
7.1.140.0320.00616.51
7.1.130.0500.01616.70
7.1.120.0380.01116.76
7.1.110.0270.01416.18
7.1.100.0330.01315.76
7.1.90.0410.01615.90
7.1.80.0570.00616.16
7.1.70.0430.01315.12
7.1.60.0470.02033.09
7.1.50.0540.01533.07
7.1.40.0640.01132.82
7.1.30.0600.01232.44
7.1.20.0610.01432.84
7.1.10.0360.01814.55
7.1.00.0530.01014.83

preferences:
48.11 ms | 401 KiB | 5 Q