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:1;}"); $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.0120.00318.20
8.3.50.0100.00720.08
8.3.40.0060.00918.76
8.3.30.0030.01218.71
8.3.20.0080.00020.35
8.3.10.0080.00023.61
8.3.00.0070.00019.85
8.2.180.0150.00318.11
8.2.170.0040.01122.96
8.2.160.0100.01019.09
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00419.29
8.2.120.0000.00726.35
8.2.110.0070.00322.13
8.2.100.0080.00819.57
8.2.90.0000.00817.84
8.2.80.0000.00819.21
8.2.70.0050.00317.80
8.2.60.0040.00417.80
8.2.50.0040.00418.10
8.2.40.0030.00520.61
8.2.30.0050.00319.36
8.2.20.0040.00418.03
8.2.10.0000.00818.04
8.2.00.0040.00418.25
8.1.280.0150.00425.92
8.1.270.0040.00420.33
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.14
8.1.230.0060.00620.89
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0080.00017.36
8.1.190.0000.00817.52
8.1.180.0080.00018.10
8.1.170.0000.00819.01
8.1.160.0040.00418.90
8.1.150.0000.00720.27
8.1.140.0050.00217.63
8.1.130.0030.00318.88
8.1.120.0030.00317.47
8.1.110.0060.00317.45
8.1.100.0040.00417.46
8.1.90.0000.00717.45
8.1.80.0020.00517.50
8.1.70.0050.00517.52
8.1.60.0000.00817.60
8.1.50.0040.00417.54
8.1.40.0000.00817.49
8.1.30.0050.00317.59
8.1.20.0030.00517.58
8.1.10.0040.00417.59
8.1.00.0050.00317.51
8.0.300.0040.00420.14
8.0.290.0050.00316.63
8.0.280.0070.00018.41
8.0.270.0000.00717.26
8.0.260.0000.00716.83
8.0.250.0000.00716.91
8.0.240.0030.00316.85
8.0.230.0030.00616.97
8.0.220.0070.00016.79
8.0.210.0030.00316.90
8.0.200.0040.00416.95
8.0.190.0050.00316.92
8.0.180.0000.00716.82
8.0.170.0030.00516.93
8.0.160.0030.00516.81
8.0.150.0000.00716.86
8.0.140.0000.00716.94
8.0.130.0030.00313.38
8.0.120.0020.00516.85
8.0.110.0000.00716.79
8.0.100.0030.00316.82
8.0.90.0070.00016.77
8.0.80.0150.00616.88
8.0.70.0000.00716.81
8.0.60.0040.00416.62
8.0.50.0030.00516.66
8.0.30.0090.01117.13
8.0.20.0160.01217.41
8.0.10.0040.00417.00
8.0.00.0130.00716.74
7.4.330.0050.00016.71
7.4.320.0020.00516.56
7.4.300.0060.00016.52
7.4.290.0000.00616.48
7.4.280.0040.00416.52
7.4.270.0040.00416.59
7.4.260.0100.00016.60
7.4.250.0030.00316.57
7.4.240.0040.00416.61
7.4.230.0030.00316.31
7.4.220.0070.00016.30
7.4.210.0050.01116.59
7.4.200.0030.00316.58
7.4.160.0120.00416.47
7.4.150.0140.00417.40
7.4.140.0110.00717.86
7.4.130.0070.01016.64
7.4.120.0080.01016.53
7.4.110.0080.00816.59
7.4.100.0030.01316.47
7.4.90.0060.01016.64
7.4.80.0100.01619.39
7.4.70.0100.00716.53
7.4.60.0070.00816.50
7.4.50.0110.00616.56
7.4.40.0100.00716.59
7.4.00.0090.00814.92
7.3.330.0000.00513.33
7.3.320.0060.00013.33
7.3.310.0030.00316.33
7.3.300.0030.00316.30
7.3.290.0000.00716.24
7.3.280.0080.01016.40
7.3.270.0100.01017.40
7.3.260.0120.00716.45
7.3.250.0080.00816.56
7.3.240.0090.00816.56
7.3.230.0200.00416.44
7.3.210.0100.00716.33
7.3.200.0140.00316.38
7.3.190.0120.00316.66
7.3.180.0090.01216.62
7.3.170.0110.00716.32
7.3.160.0040.01216.54
7.3.120.0100.00914.75
7.3.110.0070.01014.66
7.3.100.0060.00814.93
7.3.90.0050.00614.82
7.3.80.0070.00914.91
7.3.70.0080.00414.70
7.3.60.0050.00714.85
7.3.50.0060.00814.80
7.3.40.0070.00914.85
7.3.30.0080.00414.84
7.3.20.0060.00616.63
7.3.10.0070.00616.54
7.3.00.0040.01116.68
7.2.330.0160.00916.56
7.2.320.0040.01516.68
7.2.310.0090.00916.61
7.2.300.0100.00716.48
7.2.290.0030.01416.63
7.2.250.0060.01415.23
7.2.240.0060.01115.06
7.2.230.0060.00915.02
7.2.220.0070.00715.19
7.2.210.0030.01115.06
7.2.200.0070.00515.06
7.2.190.0080.01014.95
7.2.180.0070.01115.20
7.2.170.0040.01015.01
7.2.110.0200.00316.65
7.2.60.0080.00416.94
7.2.20.0170.01017.87
7.2.10.0260.01317.69
7.2.00.0450.01617.79
7.1.330.0040.01015.89
7.1.320.0050.00615.82
7.1.310.0070.00915.85
7.1.300.0040.00815.74
7.1.290.0020.01115.82
7.1.280.0080.00615.83
7.1.270.0030.01015.69
7.1.260.0020.01015.80
7.1.200.0060.00915.87
7.1.140.0260.00616.60
7.1.130.0210.00416.78
7.1.120.0200.00716.94
7.1.110.0150.01216.25
7.1.100.0130.01316.14
7.1.90.0290.00616.20
7.1.80.0220.00315.81
7.1.70.0270.01015.56
7.1.60.0570.02333.25
7.1.50.0250.01533.14
7.1.40.0680.00732.70
7.1.30.0260.01332.56
7.1.20.0440.01032.78
7.1.10.0310.00714.70
7.1.00.0200.01014.96

preferences:
32.07 ms | 400 KiB | 5 Q