3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $state = 'not destructed'; public function __destruct() { $this->state = 'destructed'; } } class B { protected $a; public function __construct(A $a) { $this->a = $a; } public function __destruct() { var_dump($this->a->state); } } $a = new A; $b = new B($a); // prevent early destruction by binding to an error handler (one of the last things that is freed) set_error_handler(function() use($b) {});

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.0090.01218.43
8.3.50.0140.00318.12
8.3.40.0110.01020.08
8.3.30.0140.00418.84
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.180.0170.00325.92
8.2.170.0110.01118.96
8.2.160.0100.00322.96
8.2.150.0090.00025.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00426.35
8.2.110.0000.01020.94
8.2.100.0110.00017.78
8.2.90.0050.00317.75
8.2.80.0000.00818.80
8.2.70.0080.00458.76
8.2.60.0000.00917.80
8.2.50.0000.00918.07
8.2.40.0000.00718.09
8.2.30.0050.00217.94
8.2.20.0070.00017.96
8.2.10.0040.00419.13
8.2.00.0040.00419.29
8.1.280.0060.00925.92
8.1.270.0060.00322.14
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0060.00321.12
8.1.230.0110.00020.93
8.1.220.0000.00817.76
8.1.210.0050.00318.77
8.1.200.0000.00817.38
8.1.190.0040.00417.35
8.1.180.0050.00218.10
8.1.170.0030.00518.63
8.1.160.0040.00418.81
8.1.150.0000.00718.91
8.1.140.0000.00720.61
8.1.130.0000.00720.11
8.1.120.0040.00417.38
8.1.110.0040.00417.34
8.1.100.0040.00717.49
8.1.90.0050.00217.35
8.1.80.0070.00017.45
8.1.70.0070.00017.45
8.1.60.0040.00417.58
8.1.50.0040.00417.49
8.1.40.0090.00317.45
8.1.30.0000.00817.66
8.1.20.0130.00317.58
8.1.10.0140.00517.57
8.1.00.0110.00517.51
8.0.300.0020.00518.77
8.0.290.0070.00016.75
8.0.280.0030.00318.42
8.0.270.0000.00817.88
8.0.260.0060.00020.19
8.0.250.0030.00317.01
8.0.240.0000.00716.91
8.0.230.0030.00316.95
8.0.220.0030.00316.79
8.0.210.0070.00016.88
8.0.200.0000.00617.02
8.0.190.0030.00616.92
8.0.180.0000.00716.98
8.0.170.0030.00516.85
8.0.160.0040.00417.04
8.0.150.0050.00316.88
8.0.140.0040.01016.83
8.0.130.0110.00315.14
8.0.120.0100.00416.80
8.0.110.0070.00416.86
8.0.100.0080.00216.93
8.0.90.0050.00516.87
8.0.80.0140.00516.89
8.0.70.0060.00516.97
8.0.60.0070.00616.82
8.0.50.0090.00416.93
8.0.30.0120.00517.08
8.0.20.0190.00017.06
8.0.10.0180.00817.03
8.0.00.0130.00517.06
7.4.330.0050.00015.55
7.4.320.0070.00016.60
7.4.300.0000.00616.55
7.4.290.0030.00316.57
7.4.280.0030.00516.63
7.4.270.0100.00516.52
7.4.260.0060.00514.91
7.4.250.0100.00516.48
7.4.240.0110.00216.45
7.4.230.0080.00516.52
7.4.220.0050.00616.57
7.4.210.0070.01016.55
7.4.200.0060.00516.63
7.4.190.0160.00316.47
7.4.180.0190.00016.54
7.4.160.0130.00316.50
7.4.150.0170.01016.54
7.4.140.0190.00316.46
7.4.130.0110.00716.04
7.4.120.0150.00316.17
7.4.110.0180.00216.36
7.4.100.0130.00616.24
7.4.90.0120.00916.30
7.4.80.0090.00816.37
7.4.70.0130.00516.42
7.4.60.0130.00616.36
7.4.50.0140.00516.41
7.4.40.0120.00716.37
7.4.30.0100.00916.51
7.4.20.0120.00716.57
7.4.10.0120.00616.46
7.4.00.0130.00516.46
7.3.330.0080.00616.32
7.3.320.0090.00614.72
7.3.310.0120.00216.22
7.3.300.0090.00516.21
7.3.290.0100.00616.25
7.3.280.0150.00416.31
7.3.270.0250.00416.30
7.3.260.0220.00616.32
7.3.250.0130.00716.32
7.3.240.0160.00616.38
7.3.230.0150.00616.23
7.3.220.0180.00316.17
7.3.210.0150.01016.19
7.3.200.0150.00816.24
7.3.190.0170.00617.19
7.3.180.0180.00416.39
7.3.170.0140.00716.11
7.3.160.0120.00916.40
7.3.150.0140.00816.13
7.3.140.0160.00516.29
7.3.130.0190.00316.28
7.3.120.0180.00516.34
7.3.110.0160.00716.27
7.3.100.0140.00716.30
7.3.90.0140.00816.39
7.3.80.0130.01016.32
7.3.70.0140.00916.34
7.3.60.0200.00316.47
7.3.50.0170.00616.48
7.3.40.0200.00216.32
7.3.30.0150.00616.41
7.3.20.0170.00617.23
7.3.10.0150.00817.40
7.3.00.0210.00517.21
5.4.140.0120.00416.07
5.1.10.0090.00416.07

preferences:
65.29 ms | 400 KiB | 5 Q