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() { printf("Constructor for ClassWithSetMagic\n"); } public function __set($name, $value) { printf("Setting %s\n", $name); } } class ClassInheritingFromClassWithSetMagic extends ClassWithSetMagic { public ?ClassUsedForTyping $example = null; public function __construct() { printf("Constructor for ClassInheritingFromClassWithSetMagic\n"); $this->example = new ClassUsedForTyping(); parent::__construct(); } } $inst = new ClassInheritingFromClassWithSetMagic(); 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.120.0130.00720.54
8.4.110.0100.00918.79
8.4.100.0110.00918.94
8.4.90.0050.00322.18
8.4.80.0060.00318.65
8.4.70.0130.00618.96
8.4.60.0120.00718.99
8.4.50.0100.01118.82
8.4.40.0150.00617.77
8.4.30.0130.00018.32
8.4.20.0060.00318.89
8.4.10.0120.00317.52
8.3.250.0100.00918.73
8.3.240.0120.00816.48
8.3.230.0030.00516.84
8.3.220.0060.00218.80
8.3.210.0120.00916.53
8.3.200.0130.00616.50
8.3.190.0110.01117.10
8.3.180.0100.00419.16
8.3.170.0090.00916.80
8.3.160.0070.01017.41
8.3.150.0110.00417.33
8.3.140.0040.00420.64
8.3.130.0000.00818.32
8.3.120.0030.00619.09
8.3.110.0060.00320.94
8.3.100.0050.00516.86
8.3.90.0040.00418.20
8.3.80.0060.00618.31
8.3.70.0030.01716.75
8.3.60.0070.00716.63
8.3.50.0130.00618.21
8.3.40.0040.01418.67
8.3.30.0060.00918.79
8.3.20.0040.00420.34
8.3.10.0070.00721.85
8.3.00.0040.00422.27
8.2.290.0100.00520.30
8.2.280.0090.00818.61
8.2.270.0180.00016.71
8.2.260.0030.00616.65
8.2.250.0030.00516.73
8.2.240.0040.00419.27
8.2.230.0060.00322.58
8.2.220.0040.00424.06
8.2.210.0050.00326.77
8.2.200.0090.00018.55
8.2.190.0060.01316.58
8.2.180.0130.00618.16
8.2.170.0070.00722.96
8.2.160.0140.00720.35
8.2.150.0030.00624.18
8.2.140.0040.01124.66
8.2.130.0060.00326.16
8.2.120.0040.00426.16
8.2.110.0030.00620.52
8.2.100.0040.00817.78
8.2.90.0050.00317.63
8.2.80.0080.00019.66
8.2.70.0000.00817.80
8.2.60.0040.00417.97
8.2.50.0040.00418.10
8.2.40.0000.00821.02
8.2.30.0000.00819.20
8.2.20.0070.00018.03
8.2.10.0050.00319.25
8.2.00.0000.00719.05
8.1.330.0100.00916.28
8.1.320.0120.00617.89
8.1.310.0120.00618.05
8.1.300.0090.00020.40
8.1.290.0060.00318.88
8.1.280.0080.00825.92
8.1.270.0070.01022.00
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00023.98
8.1.230.0110.00020.91
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0060.00317.23
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0080.00018.57
8.1.160.0000.00718.88
8.1.150.0000.00718.75
8.1.140.0040.00420.74
8.1.130.0030.00520.09
8.1.120.0040.00417.41
8.1.110.0000.00717.43
8.1.100.0000.00817.31
8.1.90.0030.00517.32
8.1.80.0060.00317.32
8.1.70.0000.00717.28
8.1.60.0060.00317.49
8.1.50.0050.00317.38
8.1.40.0090.00017.53
8.1.30.0040.00417.66
8.1.20.0040.00417.64
8.1.10.0000.00817.45
8.1.00.0040.00417.58
8.0.300.0080.00019.81
8.0.290.0080.00016.75
8.0.280.0030.00518.26
8.0.270.0070.00017.28
8.0.260.0030.00321.86
8.0.250.0000.00716.89
8.0.240.0070.00016.84
8.0.230.0000.00816.89
8.0.220.0040.00416.81
8.0.210.0000.00716.75
8.0.200.0000.00716.94
8.0.190.0030.00516.81
8.0.180.0040.00416.92
8.0.170.0030.00616.87
8.0.160.0050.00316.73
8.0.150.0000.01016.80
8.0.140.0050.00316.77
8.0.130.0000.00513.33
8.0.120.0000.00816.84
8.0.110.0040.00416.81
8.0.100.0000.00816.73
8.0.90.0040.00416.87
8.0.80.0070.01316.81
8.0.70.0070.00016.95
8.0.60.0040.00416.95
8.0.50.0000.00716.63
8.0.30.0040.01317.08
8.0.20.0040.01716.96
8.0.10.0040.00417.00
8.0.00.0130.01016.79
7.4.330.0030.00316.73
7.4.320.0050.00216.32
7.4.300.0040.00416.49
7.4.290.0040.00416.61
7.4.280.0030.00516.57
7.4.270.0030.00516.43
7.4.260.0000.00513.30
7.4.250.0000.00716.61
7.4.240.0070.00216.53
7.4.230.0050.00216.42
7.4.220.0020.00516.58
7.4.210.0090.00716.55
7.4.200.0000.00716.54
7.4.140.0070.01017.86
7.4.130.0090.01616.40
7.4.120.0100.01616.50
7.4.110.0070.01016.42
7.4.100.0090.00916.28
7.4.90.0070.01316.41
7.4.80.0070.01019.39
7.4.70.0130.00316.56
7.4.60.0100.00616.41
7.4.50.0100.00716.40
7.4.40.0130.00316.52
7.3.330.0020.00516.02
7.3.320.0030.00313.23
7.3.310.0070.00016.02
7.3.300.0040.00416.08
7.3.290.0030.00316.14
7.3.280.0030.01616.28
7.3.260.0090.00916.33
7.3.240.0070.01116.32
7.3.230.0130.01016.09
7.3.210.0060.01116.23
7.3.200.0140.00316.37
7.3.190.0060.01016.35
7.3.180.0090.00616.21
7.3.170.0090.01216.25
7.3.160.0120.00916.17
7.3.90.0060.00914.52
7.3.80.0080.00714.43
7.3.70.0050.01114.41
7.3.60.0060.01414.51
7.3.50.0150.00214.46
7.3.40.0090.00714.54
7.3.30.0070.00814.42
7.3.20.0110.00414.46
7.3.10.0120.00414.65
7.3.00.0120.00914.72
7.2.330.0100.00716.50
7.2.320.0140.00416.35
7.2.310.0060.00916.37
7.2.300.0090.00616.34
7.2.290.0080.01216.46
7.2.220.0110.01214.67
7.2.210.0030.01414.62
7.2.200.0090.01914.66
7.2.190.0110.00914.57
7.2.180.0100.00914.65
7.2.170.0090.00814.76
7.2.160.0110.00714.77
7.2.150.0070.00914.72
7.2.140.0120.00414.84
7.2.130.0100.00614.71
7.2.120.0190.01914.62
7.2.110.0100.00614.82
7.2.100.0070.00914.78
7.2.90.0100.00914.97
7.2.80.0080.00914.87
7.2.70.0050.01214.67
7.2.60.0090.00914.86
7.2.50.0120.00414.63
7.2.40.0110.00514.74
7.2.30.0070.00914.74
7.2.20.0130.00614.90
7.2.10.0060.01314.72
7.2.00.0080.00714.92
7.1.320.0170.00613.66
7.1.310.0060.01113.55
7.1.300.0070.01313.67
7.1.290.0000.01513.69
7.1.280.0090.00813.40
7.1.270.0040.01113.79
7.1.260.0090.00613.55
7.1.250.0060.00913.67

preferences:
27.12 ms | 403 KiB | 5 Q