3v4l.org

run code in 500+ PHP versions simultaneously
<?php class F { private string $bar; public function __construct(private string $foo, string $bar){ $this->bar = $bar; } public function __sleep(): array { return array_keys(get_object_vars($this)); } public function getFoo():string { return $this->foo; } public function getBar():string { return $this->bar; } } $g = new F('this is a private variable', 'so is this'); class G extends F {} $s = serialize($g); var_export($s); $n = unserialize($s); echo \PHP_EOL; echo $n->getFoo(); echo \PHP_EOL; echo $n->getBar(); $h = new G('This is an extension', 'of the other one'); $s = serialize($h); echo \PHP_EOL; var_export($s); $n = unserialize($s); echo \PHP_EOL; echo $n->getFoo(); echo \PHP_EOL; echo $n->getBar();

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.5.90.0060.00718.76
8.5.80.0100.00817.05
8.5.70.0140.00517.10
8.5.60.0100.00717.09
8.5.50.0100.00817.02
8.5.30.0090.00819.61
8.5.20.0120.00718.04
8.5.10.0100.00916.62
8.5.00.0110.01120.29
8.4.240.0040.00619.79
8.4.230.0140.00719.60
8.4.220.0090.00819.66
8.4.210.0070.01319.60
8.4.180.0110.01019.67
8.4.170.0070.01423.91
8.4.160.0080.00223.10
8.4.150.0060.00716.88
8.4.140.0120.01017.93
8.4.130.0120.00517.95
8.4.120.0080.01020.83
8.4.110.0120.00622.62
8.4.100.0100.01117.98
8.4.90.0150.00617.91
8.4.80.0100.00818.20
8.4.70.0090.00418.16
8.4.60.0160.00518.63
8.4.50.0100.00920.47
8.4.40.0140.00717.93
8.4.30.0150.00318.66
8.4.20.0160.00320.55
8.4.10.0030.00619.75
8.3.330.0120.00918.56
8.3.320.0150.00818.55
8.3.310.0060.00418.51
8.3.300.0120.01018.46
8.3.290.0110.01020.70
8.3.280.0130.00920.13
8.3.270.0100.00916.85
8.3.260.0140.00516.63
8.3.250.0090.01018.76
8.3.240.0100.01016.39
8.3.230.0080.00616.58
8.3.220.0070.00317.02
8.3.210.0080.00816.88
8.3.200.0070.00316.73
8.3.190.0110.00817.09
8.3.180.0100.00616.89
8.3.170.0090.00919.04
8.3.160.0040.00417.05
8.3.150.0110.00717.07
8.3.140.0000.00816.78
8.3.130.0030.00718.79
8.3.120.0100.00618.81
8.3.110.0090.00320.94
8.3.100.0040.00424.06
8.3.90.0070.01126.77
8.3.80.0070.00318.43
8.3.70.0150.00016.88
8.3.60.0110.00418.43
8.3.50.0070.01016.75
8.3.40.0070.00720.04
8.3.30.0090.00618.85
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.320.0110.00718.24
8.2.310.0110.01018.11
8.2.300.0110.01018.02
8.2.290.0120.00820.30
8.2.280.0090.01120.53
8.2.270.0140.00417.24
8.2.260.0040.00416.91
8.2.250.0040.00416.89
8.2.240.0080.00017.19
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0120.00326.77
8.2.200.0060.00316.50
8.2.190.0190.00416.75
8.2.180.0140.00716.75
8.2.170.0090.00619.04
8.2.160.0100.00322.96
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00320.94
8.2.110.0030.01722.16
8.2.100.0180.00420.80
8.2.90.0270.00718.75
8.2.80.0200.01018.89
8.2.70.0270.00718.59
8.2.60.0160.01318.81
8.2.50.0220.00319.78
8.2.40.0070.00718.82
8.2.30.0090.00618.77
8.2.20.0240.00318.53
8.2.10.0170.00418.82
8.2.00.0150.00718.95
8.1.340.0110.01017.88
8.1.330.0090.01021.72
8.1.320.0120.00916.29
8.1.310.0110.00716.90
8.1.300.0090.00016.25
8.1.290.0090.00030.84
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0210.00318.47
8.1.230.0270.00018.57
8.1.220.0090.00418.52
8.1.210.0210.00319.88
8.1.200.0030.01018.38
8.1.190.0190.00618.31
8.1.180.0190.00818.42
8.1.170.0160.01318.31
8.1.160.0140.00018.69
8.1.150.0090.00320.42
8.1.140.0110.01418.17
8.1.130.0100.00518.32
8.1.120.0220.00018.53
8.1.110.0170.00019.59
8.1.100.0110.00418.13
8.1.90.0090.00418.45
8.1.80.0120.00318.56
8.1.70.0110.00518.63
8.1.60.0070.01018.55
8.1.50.0120.00618.52
8.1.40.0070.01018.69
8.1.30.0090.00418.96
8.1.20.0120.00418.94
8.1.10.0130.00318.86
8.1.00.0110.00418.51
8.0.300.0150.00017.79
8.0.290.0090.00617.77
8.0.280.0060.00917.95
8.0.270.0160.00017.81
8.0.260.0120.00018.40
8.0.250.0090.00617.88
8.0.240.0150.00018.01
8.0.230.0090.00318.34
8.0.220.0150.00017.80
8.0.210.0070.00717.82
8.0.200.0080.00817.63
8.0.190.0090.00318.23
8.0.180.0140.00017.92
8.0.170.0150.00017.86
8.0.160.0060.00917.80
8.0.150.0150.00017.83
8.0.140.0150.00017.80
8.0.130.0060.00618.06
8.0.120.0060.00917.94
8.0.110.0100.00317.85
8.0.100.0090.00617.83
8.0.90.0090.00617.88
8.0.80.0130.00317.94
8.0.70.0120.00317.73
8.0.60.0120.00018.23
8.0.50.0100.00517.84
8.0.30.0100.00218.14
8.0.20.0130.00317.83
8.0.10.0080.00817.99

preferences:
77.77 ms | 1246 KiB | 5 Q