3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(E_ALL); class ClassUsedForTyping { public int $x = 1234; } class ClassWithSetMagic { public function __construct() { printf("Constructor for ClassWithSetMagic\n"); } public function __set($name, $value) { printf("Setting %s\n", $name); } public function __get($name) { printf("Getting %s\n", $name); return null; } } class ClassInheritingFromClassWithSetMagic extends ClassWithSetMagic { public ClassUsedForTyping $example; public function __construct() { parent::__construct(); $this->example = new ClassUsedForTyping(); } } $inst = new ClassInheritingFromClassWithSetMagic(); print_r($inst->example);

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.0110.01017.73
8.4.120.0120.00820.64
8.4.110.0120.00722.38
8.4.100.0130.00717.80
8.4.90.0130.00618.69
8.4.80.0110.00819.69
8.4.70.0130.00917.66
8.4.60.0100.01018.82
8.4.50.0070.00617.66
8.4.40.0090.00917.75
8.4.30.0100.00618.57
8.4.20.0100.00018.75
8.4.10.0080.00817.62
8.3.260.0120.00716.68
8.3.250.0120.00519.07
8.3.240.0100.00916.44
8.3.230.0110.00716.56
8.3.220.0140.00517.10
8.3.210.0040.00518.46
8.3.200.0050.00416.50
8.3.190.0140.00517.16
8.3.180.0070.00216.48
8.3.170.0070.01018.91
8.3.160.0110.00718.40
8.3.150.0090.00918.96
8.3.140.0050.00318.49
8.3.130.0090.00016.81
8.3.120.0170.00319.00
8.3.110.0040.00420.94
8.3.100.0070.00416.59
8.3.90.0090.00618.18
8.3.80.0030.00618.43
8.3.70.0160.00016.63
8.3.60.0040.01116.50
8.3.50.0110.00518.42
8.3.40.0060.01018.75
8.3.30.0120.00318.71
8.3.20.0040.00420.35
8.3.10.0070.00021.94
8.3.00.0080.00022.37
8.2.290.0130.00620.58
8.2.280.0080.01118.37
8.2.270.0100.01017.39
8.2.260.0090.00918.42
8.2.250.0000.00818.49
8.2.240.0030.00619.13
8.2.230.0030.00622.58
8.2.220.0000.00924.06
8.2.210.0000.00726.77
8.2.200.0000.00916.63
8.2.190.0160.01016.58
8.2.180.0080.00818.43
8.2.170.0150.00422.96
8.2.160.0030.01020.47
8.2.150.0090.00024.18
8.2.140.0110.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0060.00321.14
8.2.100.0030.00917.91
8.2.90.0040.00417.72
8.2.80.0040.00417.97
8.2.70.0040.00417.90
8.2.60.0000.00718.16
8.2.50.0030.00618.10
8.2.40.0040.00421.16
8.2.30.0040.00419.07
8.2.20.0040.00418.07
8.2.10.0000.00719.20
8.2.00.0040.00419.21
8.1.330.0130.00623.61
8.1.320.0090.01117.80
8.1.310.0040.00418.25
8.1.300.0110.00418.34
8.1.290.0060.00318.88
8.1.280.0190.00325.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.19
8.1.230.0040.00822.82
8.1.220.0000.00817.74
8.1.210.0040.00418.98
8.1.200.0050.00517.35
8.1.190.0040.00417.22
8.1.180.0090.00018.10
8.1.170.0030.00518.52
8.1.160.0000.00718.89
8.1.150.0000.00718.89
8.1.140.0000.00720.80
8.1.130.0070.00020.07
8.1.120.0040.00417.39
8.1.110.0030.00517.44
8.1.100.0000.00717.27
8.1.90.0050.00317.38
8.1.80.0030.00617.27
8.1.70.0030.00617.41
8.1.60.0030.00517.51
8.1.50.0040.00417.48
8.1.40.0050.00317.52
8.1.30.0030.00617.55
8.1.20.0040.00417.67
8.1.10.0070.00017.58
8.1.00.0050.00317.55
8.0.300.0000.00822.08
8.0.290.0000.00716.75
8.0.280.0000.00718.29
8.0.270.0000.00717.11
8.0.260.0030.00322.02
8.0.250.0030.00316.81
8.0.240.0080.00016.77
8.0.230.0000.00716.79
8.0.220.0070.00016.76
8.0.210.0080.00016.79
8.0.200.0060.00316.88
8.0.190.0030.00316.86
8.0.180.0030.00516.78
8.0.170.0040.00416.73
8.0.160.0040.00416.82
8.0.150.0100.00016.65
8.0.140.0000.00716.67
8.0.130.0000.00513.27
8.0.120.0080.00016.76
8.0.110.0040.00416.65
8.0.100.0000.00716.72
8.0.90.0000.00816.73
8.0.80.0180.00416.87
8.0.70.0000.00716.61
8.0.60.0040.00416.73
8.0.50.0050.00316.73
8.0.30.0180.00317.30
8.0.20.0060.01317.33
8.0.10.0000.00717.01
8.0.00.0100.00716.80
7.4.330.0000.00416.84
7.4.320.0030.00316.43
7.4.300.0060.00316.61
7.4.290.0060.00316.46
7.4.280.0040.00416.40
7.4.270.0030.00316.42
7.4.260.0050.00013.27
7.4.250.0040.00416.57
7.4.240.0020.00516.56
7.4.230.0000.00716.57
7.4.220.0000.00716.40
7.4.210.0070.00916.54
7.4.200.0070.00016.36
7.4.140.0100.00717.86
7.4.130.0250.00016.41
7.4.120.0050.01616.60
7.4.110.0060.01116.42
7.4.100.0200.00316.63
7.4.90.0070.01116.32
7.4.80.0190.00019.39
7.4.70.0060.00916.40
7.4.60.0090.00616.29
7.4.50.0070.01116.36
7.4.40.0000.01716.22
7.3.330.0050.00216.31
7.3.320.0030.00313.10
7.3.310.0040.00416.23
7.3.300.0070.00016.16
7.3.290.0000.00716.21
7.3.280.0130.00616.17
7.3.260.0120.00716.20
7.3.240.0100.00816.31
7.3.230.0090.00916.23
7.3.210.0070.01016.31
7.3.200.0030.01416.29
7.3.190.0130.00616.29
7.3.180.0100.01316.21
7.3.170.0120.00616.19
7.3.160.0090.01216.29
7.3.90.0100.01014.54
7.3.80.0260.00014.41
7.3.70.0150.00914.65
7.3.60.0200.00014.50
7.3.50.0090.01814.60
7.3.40.0100.01314.42
7.3.30.0160.00414.60
7.3.20.0240.00016.04
7.3.10.0120.00716.55
7.3.00.0040.01116.37
7.2.330.0190.00016.57
7.2.320.0160.00716.17
7.2.310.0060.01016.32
7.2.300.0080.00816.12
7.2.290.0060.00916.52
7.2.220.0070.01114.44
7.2.210.0210.00514.60
7.2.200.0110.01114.68
7.2.190.0250.00314.89
7.2.180.0100.01014.54
7.2.170.0210.00614.82
7.2.160.0110.01114.66
7.2.150.0200.00616.75
7.2.140.0190.00416.41
7.2.130.0090.01316.55
7.2.120.0180.01116.48
7.2.110.0170.01216.32
7.2.100.0140.01416.39
7.2.90.0140.00916.45
7.2.80.0140.00716.71
7.2.70.0190.00516.38
7.2.60.0140.01016.65
7.2.50.0050.01516.67
7.2.40.0130.01316.61
7.2.30.0140.00716.68
7.2.20.0120.00916.58
7.2.10.0150.00916.42
7.2.00.0060.01216.54
7.1.320.0050.01413.72
7.1.310.0150.00913.48
7.1.300.0100.02013.35
7.1.290.0410.00415.43
7.1.280.0110.01115.30
7.1.270.0180.00615.23
7.1.260.0160.00415.16
7.1.250.0120.01315.09

preferences:
29.96 ms | 403 KiB | 5 Q