3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(E_ALL); class ClassUsedForTyping { } class ClassWithSetMagic { public function __construct(array $dummy) { printf("Constructor for ClassWithSetMagic\n"); } public function __set($name, $value) { printf("Setting %s\n", $name); } public function __isset($name) { return false; } } class ClassInheritingFromClassWithSetMagic extends ClassWithSetMagic { public ClassUsedForTyping $property_with_type; public function __construct(array $dummy, ClassUsedForTyping $class_used_for_typing) { parent::__construct($dummy); printf("Constructor for ClassInheritingFromClassWithSetMagic\n"); $this->property_with_type = $class_used_for_typing; } } $inst = new ClassInheritingFromClassWithSetMagic( [], new ClassUsedForTyping() ); print_r($inst);

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.0120.00819.36
8.4.120.0110.01220.64
8.4.110.0100.01022.28
8.4.100.0100.01217.94
8.4.90.0060.00720.59
8.4.80.0050.00418.75
8.4.70.0040.00522.27
8.4.60.0090.00920.66
8.4.50.0140.00618.64
8.4.40.0090.00917.78
8.4.30.0150.00618.34
8.4.20.0070.00318.75
8.4.10.0130.00317.74
8.3.260.0080.00716.68
8.3.250.0100.00818.89
8.3.240.0110.00817.41
8.3.230.0090.00416.50
8.3.220.0040.00418.97
8.3.210.0050.00216.52
8.3.200.0020.00716.52
8.3.190.0120.00718.77
8.3.180.0020.00618.73
8.3.170.0120.00618.84
8.3.160.0180.00016.67
8.3.150.0110.00717.32
8.3.140.0040.00421.04
8.3.130.0040.00816.59
8.3.120.0120.00618.95
8.3.110.0050.00216.79
8.3.100.0040.00418.38
8.3.90.0140.00416.39
8.3.80.0060.00318.30
8.3.70.0080.00816.50
8.3.60.0060.00816.63
8.3.50.0240.00217.49
8.3.40.0110.00718.54
8.3.30.0070.01518.67
8.3.20.0050.00322.11
8.3.10.0070.01321.59
8.3.00.0040.00422.38
8.2.290.0070.00318.40
8.2.280.0110.00920.35
8.2.270.0090.00916.50
8.2.260.0000.00817.10
8.2.250.0060.00316.63
8.2.240.0090.00619.06
8.2.230.0080.00020.94
8.2.220.0040.00424.06
8.2.210.0040.00426.77
8.2.200.0030.00618.54
8.2.190.0100.01016.58
8.2.180.0040.01118.38
8.2.170.0040.01122.96
8.2.160.0110.00320.52
8.2.150.0060.00324.18
8.2.140.0070.00724.66
8.2.130.0080.00026.16
8.2.120.0000.00826.16
8.2.110.0100.00022.13
8.2.100.0040.00817.73
8.2.90.0040.00419.21
8.2.80.0060.00317.97
8.2.70.0030.00517.50
8.2.60.0040.00417.93
8.2.50.0090.00018.07
8.2.40.0000.00818.22
8.2.30.0050.00217.99
8.2.20.0040.00418.01
8.2.10.0030.00519.24
8.2.00.0040.00419.09
8.1.330.0140.00521.84
8.1.320.0150.00415.96
8.1.310.0090.00016.60
8.1.300.0060.00317.76
8.1.290.0060.00318.88
8.1.280.0000.01525.92
8.1.270.0140.00422.05
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00320.55
8.1.230.0090.00917.70
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0060.00617.98
8.1.160.0000.00918.84
8.1.150.0000.00818.79
8.1.140.0050.00320.84
8.1.130.0000.00820.07
8.1.120.0040.00417.36
8.1.110.0000.00917.29
8.1.100.0050.00317.41
8.1.90.0060.00317.30
8.1.80.0050.00217.43
8.1.70.0040.00417.41
8.1.60.0040.00417.60
8.1.50.0040.00417.58
8.1.40.0040.00417.54
8.1.30.0040.00417.66
8.1.20.0000.00817.69
8.1.10.0000.00817.48
8.1.00.0000.00817.38
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0080.00018.33
8.0.270.0070.00016.94
8.0.260.0030.00321.87
8.0.250.0030.00316.90
8.0.240.0000.00816.84
8.0.230.0040.00416.97
8.0.220.0060.00316.88
8.0.210.0060.00016.98
8.0.200.0000.00616.96
8.0.190.0000.00716.98
8.0.180.0000.00816.89
8.0.170.0000.00816.96
8.0.160.0040.00416.96
8.0.150.0000.00916.83
8.0.140.0030.00316.76
8.0.130.0060.00013.30
8.0.120.0000.00816.76
8.0.110.0030.00516.72
8.0.100.0040.00416.73
8.0.90.0000.00716.87
8.0.80.0090.00616.84
8.0.70.0000.00716.93
8.0.60.0050.00316.79
8.0.50.0000.00816.67
8.0.30.0120.00617.27
8.0.20.0090.00917.02
8.0.10.0070.00016.97
8.0.00.0130.01016.89
7.4.330.0050.00016.73
7.4.320.0030.00316.59
7.4.300.0000.00716.60
7.4.290.0030.00616.45
7.4.280.0040.00416.63
7.4.270.0070.00016.50
7.4.260.0060.00013.24
7.4.250.0000.00816.42
7.4.240.0040.00316.57
7.4.230.0030.00316.41
7.4.220.0050.00316.48
7.4.210.0090.00816.60
7.4.200.0000.00716.63
7.4.140.0120.00617.86
7.4.130.0100.00716.44
7.4.120.0120.01216.37
7.4.110.0150.01916.43
7.4.100.0060.00916.53
7.4.90.0100.00716.42
7.4.80.0030.01719.39
7.4.70.0060.01216.52
7.4.60.0090.00916.32
7.4.50.0000.01316.46
7.4.40.0140.00316.36
7.3.330.0030.00616.04
7.3.320.0030.00313.14
7.3.310.0000.00716.21
7.3.300.0000.00716.19
7.3.290.0040.00416.02
7.3.280.0040.01216.10
7.3.260.0120.00816.26
7.3.240.0120.00716.31
7.3.230.0130.00916.35
7.3.210.0060.00916.28
7.3.200.0080.01016.34
7.3.190.0100.00716.32
7.3.180.0090.01516.16
7.3.170.0060.01216.43
7.3.160.0060.00916.31
7.3.90.0060.00814.51
7.3.80.0080.00814.73
7.3.70.0070.00814.56
7.3.60.0100.00714.43
7.3.50.0070.00814.46
7.3.40.0090.00614.50
7.3.30.0060.01014.52
7.3.20.0100.00914.54
7.3.10.0080.01014.65
7.3.00.0100.00814.51
7.2.330.0140.00316.43
7.2.320.0120.00616.52
7.2.310.0090.01416.35
7.2.300.0110.01116.44
7.2.290.0120.00616.48
7.2.220.0110.00414.75
7.2.210.0080.00914.77
7.2.200.0040.01014.75
7.2.190.0070.00814.76
7.2.180.0050.01014.47
7.2.170.0040.01214.62
7.2.160.0060.01114.69
7.2.150.0140.00814.78
7.2.140.0100.00614.70
7.2.130.0100.00714.85
7.2.120.0110.00814.86
7.2.110.0090.00914.83
7.2.100.0050.01414.79
7.2.90.0110.00914.68
7.2.80.0100.01014.72
7.2.70.0070.01114.74
7.2.60.0090.01014.70
7.2.50.0150.01114.84
7.2.40.0100.01014.68
7.2.30.0130.00814.75
7.2.20.0110.00914.82
7.2.10.0110.00814.80
7.2.00.0120.00714.79
7.1.320.0090.00713.67
7.1.310.0050.01313.61
7.1.300.0040.01113.64
7.1.290.0100.00513.54
7.1.280.0090.00813.55
7.1.270.0080.00813.55
7.1.260.0080.00813.59
7.1.250.0080.00913.75

preferences:
35.08 ms | 403 KiB | 5 Q