3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct( private int $v ) {} public function f () { echo $this->v, PHP_EOL; } } class B extends A { public function __construct( $v, private string $v2 ) { parent::__construct($v); } public function f2 () { echo $this->v2, PHP_EOL; } } $i = new B(1,'2'); $i->f(); $i->f2();

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.4.130.0100.00717.59
8.4.120.0110.00920.48
8.4.110.0080.00818.63
8.4.100.0080.00417.73
8.4.90.0130.00717.77
8.4.80.0040.00517.88
8.4.70.0150.00617.65
8.4.60.0150.00517.64
8.4.50.0120.00317.74
8.4.40.0160.00320.46
8.4.30.0160.00322.23
8.4.20.0030.01317.81
8.4.10.0070.01323.71
8.3.260.0140.00616.43
8.3.250.0130.00617.28
8.3.240.0120.00716.35
8.3.230.0110.00816.62
8.3.220.0110.00619.00
8.3.210.0130.00716.66
8.3.200.0030.00417.13
8.3.190.0080.01016.55
8.3.180.0110.00816.49
8.3.170.0090.00620.78
8.3.160.0040.00418.53
8.3.150.0140.00317.35
8.3.140.0050.00316.61
8.3.130.0050.00318.52
8.3.120.0000.00920.89
8.3.110.0060.00320.94
8.3.100.0080.00324.06
8.3.90.0070.00026.77
8.3.80.0090.00017.97
8.3.70.0160.00616.50
8.3.60.0070.01016.50
8.3.50.0110.00818.53
8.3.40.0120.00320.21
8.3.30.0100.00720.65
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0070.00026.16
8.2.290.0070.00919.13
8.2.280.0050.00416.67
8.2.270.0120.00617.11
8.2.260.0070.00718.80
8.2.250.0030.00616.62
8.2.240.0090.00017.05
8.2.230.0030.00622.58
8.2.220.0030.00737.54
8.2.210.0080.00026.77
8.2.200.0090.00016.50
8.2.190.0100.00716.75
8.2.180.0140.00718.54
8.2.170.0120.00418.90
8.2.160.0090.00622.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00819.48
8.2.110.0040.00422.09
8.2.100.0080.00417.84
8.2.90.0060.00317.88
8.2.80.0000.00818.81
8.2.70.0000.00817.63
8.2.60.0070.01117.25
8.2.50.0150.00517.25
8.2.40.0150.00417.38
8.2.30.0060.01217.38
8.2.20.0050.01417.25
8.2.10.0170.00017.50
8.2.00.0140.00317.48
8.1.330.0100.00816.32
8.1.320.0110.00816.24
8.1.310.0040.00418.52
8.1.300.0060.00315.91
8.1.290.0060.00330.84
8.1.280.0140.00725.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00322.47
8.1.230.0120.00317.83
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.13
8.1.190.0120.00516.88
8.1.180.0140.00317.11
8.1.170.0130.00417.00
8.1.160.0150.00317.00
8.1.150.0200.00017.10
8.1.140.0120.00417.10
8.1.130.0130.00416.75
8.1.120.0120.00617.25
8.1.110.0160.00217.34
8.1.100.0120.00517.13
8.1.90.0080.00817.09
8.1.80.0170.00017.25
8.1.70.0110.00517.13
8.1.60.0100.00817.25
8.1.50.0150.00417.13
8.1.40.0090.00917.25
8.1.30.0110.00717.50
8.1.20.0170.00017.38
8.1.10.0070.01117.13
8.1.00.0140.00417.11
8.0.300.0040.00421.53
8.0.290.0000.00716.63
8.0.280.0080.00816.63
8.0.270.0040.01316.52
8.0.260.0170.00016.63
8.0.250.0120.00616.61
8.0.240.0100.00716.75
8.0.230.0110.00616.63
8.0.220.0100.00716.52
8.0.210.0100.00716.52
8.0.200.0170.00016.63
8.0.190.0160.00016.75
8.0.180.0130.00316.52
8.0.170.0080.00816.52
8.0.160.0150.00316.52
8.0.150.0170.00016.63
8.0.140.0250.00016.52
8.0.130.0170.00016.52
8.0.120.0100.00616.52
8.0.110.0060.00916.52
8.0.100.0150.00016.63
8.0.90.0100.00716.52
8.0.80.0140.00216.63
8.0.70.0130.00316.52
8.0.60.0080.00516.79
8.0.50.0080.00816.52
8.0.30.0140.00716.52
8.0.20.0110.00716.52
8.0.10.0110.00516.52

preferences:
28.41 ms | 403 KiB | 5 Q