3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Document { } class a { function __construct(array $config) { } } class b extends a { protected Document $document; function __construct($document) { if (is_array($document)) { // deprecation warning $this->document = new Document; // get from factory // do config stuff return; } $this->document = $document; } } $x = new b(new Document); var_dump($x);

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.120.0050.00420.69
8.4.110.0110.00919.04
8.4.100.0100.01117.90
8.4.90.0060.00420.57
8.4.80.0050.00318.96
8.4.70.0060.00220.84
8.4.60.0060.00218.63
8.4.50.0140.00618.54
8.4.40.0070.01319.40
8.4.30.0060.01218.79
8.4.20.0100.01018.89
8.4.10.0030.01323.59
8.3.250.0120.00718.70
8.3.240.0100.00716.70
8.3.230.0130.00616.55
8.3.220.0030.00518.84
8.3.210.0110.00918.36
8.3.200.0030.00516.75
8.3.190.0090.00916.95
8.3.180.0060.01218.74
8.3.170.0160.00016.63
8.3.160.0120.00617.16
8.3.150.0090.00919.08
8.3.140.0090.00019.15
8.3.130.0070.01018.32
8.3.120.0040.00419.02
8.3.110.0110.00818.44
8.3.100.0060.00318.46
8.3.90.0100.00326.77
8.3.80.0090.00016.63
8.3.70.0070.01116.58
8.3.60.0150.00018.68
8.3.50.0060.01220.22
8.3.40.0040.01120.30
8.3.30.0180.00018.79
8.3.20.0090.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0120.00718.92
8.2.280.0090.00918.24
8.2.270.0090.00922.30
8.2.260.0040.00416.71
8.2.250.0050.00316.72
8.2.240.0110.00717.26
8.2.230.0040.00420.94
8.2.220.0100.00024.06
8.2.210.0040.00426.77
8.2.200.0060.00318.41
8.2.190.0060.00916.58
8.2.180.0100.01025.92
8.2.170.0090.00918.85
8.2.160.0070.00722.96
8.2.150.0090.00625.66
8.2.140.0040.00424.66
8.2.130.0000.01426.16
8.2.120.0080.00019.42
8.2.110.0090.00022.25
8.2.100.0090.00317.72
8.2.90.0030.00517.78
8.2.80.0080.00019.02
8.2.70.0050.00317.50
8.2.60.0040.00417.25
8.2.50.0050.00318.05
8.2.40.0070.00018.16
8.2.30.0040.00417.92
8.2.20.0050.00319.17
8.2.10.0030.00517.87
8.2.00.0000.00819.16
8.1.330.0120.00816.11
8.1.320.0080.01116.31
8.1.310.0000.00816.79
8.1.300.0040.01517.95
8.1.290.0000.00930.84
8.1.280.0110.00425.92
8.1.270.0040.00424.66
8.1.260.0050.00526.35
8.1.250.0070.00028.09
8.1.240.0030.00722.53
8.1.230.0070.00420.97
8.1.220.0080.00017.74
8.1.210.0090.00018.77
8.1.200.0000.00917.35
8.1.190.0040.00417.23
8.1.180.0050.00518.10
8.1.170.0000.00817.62
8.1.160.0000.00718.97
8.1.150.0040.00418.64
8.1.140.0040.00417.45
8.1.130.0000.00718.86
8.1.120.0000.00717.29
8.1.110.0130.00617.27
8.1.100.0110.00917.19
8.1.90.0150.00317.22
8.1.80.0140.00517.23
8.1.70.0110.00717.26
8.1.60.0050.01017.10
8.1.50.0090.00917.32
8.1.40.0100.00617.37
8.1.30.0060.01217.48
8.1.20.0110.00817.47
8.1.10.0000.01417.16
8.1.00.0140.00517.50
8.0.300.0040.00420.14
8.0.290.0000.00716.63
8.0.280.0080.00018.30
8.0.270.0030.00317.20
8.0.260.0000.00818.29
8.0.250.0030.00516.86
8.0.240.0000.01116.74
8.0.230.0160.00016.85
8.0.220.0050.00816.79
8.0.210.0090.00616.73
8.0.200.0080.00816.65
8.0.190.0110.00516.75
8.0.180.0140.00316.80
8.0.170.0160.00016.91
8.0.160.0100.00516.74
8.0.150.0100.00516.72
8.0.140.0140.00216.81
8.0.130.0150.00016.88
8.0.120.0150.00316.77
8.0.110.0130.00516.75
8.0.100.0120.00416.70
8.0.90.0150.00316.69
8.0.80.0100.00516.84
8.0.70.0120.00416.73
8.0.60.0040.01116.76
8.0.50.0120.00416.81
8.0.30.0040.01216.71
8.0.20.0160.00016.91
8.0.10.0080.00816.96
7.4.330.0000.00515.55
7.4.320.0120.00616.39
7.4.300.0140.00516.48
7.4.290.0160.00416.46
7.4.280.0110.01016.41
7.4.270.0170.00316.60
7.4.260.0060.01316.47
7.4.250.0090.00916.48
7.4.240.0040.00816.54
7.4.230.0080.00516.55
7.4.220.0080.00816.55
7.4.210.0090.00916.53
7.4.200.0110.00016.40
7.4.190.0090.00316.63
7.4.180.0090.00016.05
7.4.160.0070.00316.32
7.4.150.0050.00516.39
7.4.140.0100.00316.36
7.4.130.0040.01216.53
7.4.120.0120.00016.27
7.4.110.0030.00716.36
7.4.100.0090.00616.63
7.4.90.0060.00616.45
7.4.80.0070.00316.35
7.4.70.0060.00615.99
7.4.60.0110.00216.30
7.4.50.0000.01316.28
7.4.40.0060.00916.27
7.4.30.0130.00016.38
7.4.20.0090.00516.44
7.4.10.0110.00216.28
7.4.00.0050.00916.28

preferences:
35.96 ms | 403 KiB | 5 Q