3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $prop = "test"; public function test() { $class = new class($this){ private $parentObj; public function __construct($parentObj) { $this->parentObj = $parentObj; } public function run() { echo $this->parentObj->prop; } }; $class->run(); } } $x = new MyClass(); $x->test();

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.0140.00716.50
8.3.50.0100.01016.68
8.3.40.0040.01118.63
8.3.30.0110.00418.67
8.3.20.0080.00020.36
8.3.10.0090.00023.66
8.3.00.0040.00422.14
8.2.180.0120.00918.25
8.2.170.0040.01122.96
8.2.160.0070.00719.13
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0060.00319.76
8.2.110.0030.00721.00
8.2.100.0110.00417.78
8.2.90.0000.00918.34
8.2.80.0040.00420.43
8.2.70.0080.00317.63
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0040.00420.50
8.2.30.0050.00321.02
8.2.20.0060.00318.05
8.2.10.0040.00418.05
8.2.00.0070.00017.99
8.1.280.0110.00325.92
8.1.270.0090.00623.91
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0040.00422.03
8.1.230.0100.00320.88
8.1.220.0080.00017.78
8.1.210.0040.00418.90
8.1.200.0060.00317.48
8.1.190.0000.00817.22
8.1.180.0030.00618.10
8.1.170.0030.00518.64
8.1.160.0040.00419.07
8.1.150.0050.00218.95
8.1.140.0070.00019.57
8.1.130.0040.00418.89
8.1.120.0000.00717.48
8.1.110.0040.00417.33
8.1.100.0030.00517.40
8.1.90.0000.00717.45
8.1.80.0000.00817.36
8.1.70.0070.00017.49
8.1.60.0000.00817.59
8.1.50.0000.00817.50
8.1.40.0070.00017.39
8.1.30.0030.00617.55
8.1.20.0000.00817.51
8.1.10.0030.00517.65
8.1.00.0050.00217.52
8.0.300.0070.00020.09
8.0.290.0000.00816.63
8.0.280.0000.00718.46
8.0.270.0040.00417.26
8.0.260.0040.00416.70
8.0.250.0030.00316.87
8.0.240.0050.00316.84
8.0.230.0030.00316.95
8.0.220.0000.00616.89
8.0.210.0000.00616.81
8.0.200.0030.00316.89
8.0.190.0040.00417.00
8.0.180.0070.00016.82
8.0.170.0030.00516.83
8.0.160.0020.00516.89
8.0.150.0030.00316.88
8.0.140.0070.00016.91
8.0.130.0060.00313.32
8.0.120.0000.00816.80
8.0.110.0000.00716.86
8.0.100.0030.00516.97
8.0.90.0050.00316.88
8.0.80.0070.01016.96
8.0.70.0040.00416.88
8.0.60.0040.00416.85
8.0.50.0000.00816.96
8.0.30.0120.00817.23
8.0.20.0110.00817.40
8.0.10.0000.00816.97
8.0.00.0140.00416.89
7.4.330.0050.00015.55
7.4.320.0000.00716.48
7.4.300.0030.00316.55
7.4.290.0030.00316.49
7.4.280.0000.00816.51
7.4.270.0000.00816.52
7.4.260.0000.00716.59
7.4.250.0030.00316.43
7.4.240.0070.00016.44
7.4.230.0070.00016.69
7.4.220.0000.00716.64
7.4.210.0030.01316.62
7.4.200.0030.00316.64
7.4.160.0070.00916.53
7.4.150.0040.01317.40
7.4.140.0100.01017.86
7.4.130.0100.00716.50
7.4.120.0120.00816.47
7.4.110.0070.01116.63
7.4.100.0070.01016.61
7.4.90.0140.00916.49
7.4.80.0000.01619.39
7.4.70.0090.00616.60
7.4.60.0060.01016.46
7.4.50.0030.01016.56
7.4.40.0100.00716.56
7.4.30.0060.01016.48
7.4.00.0000.01414.84
7.3.330.0000.00713.25
7.3.320.0030.00313.11
7.3.310.0000.00716.15
7.3.300.0040.00416.14
7.3.290.0030.00316.11
7.3.280.0070.00916.22
7.3.270.0060.01317.40
7.3.260.0130.01316.40
7.3.250.0120.00516.44
7.3.240.0090.00916.38
7.3.230.0110.00916.33
7.3.210.0100.00716.23
7.3.200.0090.00916.42
7.3.190.0040.01516.52
7.3.180.0110.00816.55
7.3.170.0060.01516.32
7.3.160.0130.00316.52
7.3.120.0070.00714.97
7.3.110.0060.00914.88
7.3.100.0140.00014.64
7.3.90.0000.01514.99
7.3.80.0120.00314.64
7.3.70.0030.01014.72
7.3.60.0070.00714.96
7.3.50.0080.00414.75
7.3.40.0070.00414.67
7.3.30.0000.01714.54
7.3.20.0000.01216.70
7.3.10.0220.00216.55
7.3.00.0090.01216.63
7.2.330.0060.01216.48
7.2.320.0060.01316.41
7.2.310.0070.01016.73
7.2.300.0120.00616.34
7.2.290.0170.00316.61
7.2.240.0030.01214.86
7.2.230.0090.00615.26
7.2.220.0070.00714.88
7.2.210.0140.00314.91
7.2.200.0090.00615.21
7.2.190.0030.00914.79
7.2.180.0110.00314.74
7.2.170.0040.00714.93
7.2.160.0100.00715.15
7.2.150.0070.01116.85
7.2.140.0070.01016.96
7.2.130.0170.00516.93
7.2.120.0120.00716.71
7.2.110.0050.00916.68
7.2.100.0040.00616.93
7.2.90.0080.00716.95
7.2.80.0040.00816.57
7.2.70.0040.00917.05
7.2.60.0060.01016.77
7.2.50.0060.00616.76
7.2.40.0070.01116.55
7.2.30.0100.00317.11
7.2.20.0090.00417.06
7.2.10.0060.00616.92
7.2.00.0070.00817.82
7.1.330.0060.00315.76
7.1.320.0040.00715.69
7.1.310.0060.00915.89
7.1.300.0060.00615.49
7.1.290.0070.00315.72
7.1.280.0070.01115.74
7.1.270.0120.00315.60
7.1.260.0070.00715.51
7.1.250.0080.01015.63
7.1.200.0130.00015.85
7.1.100.0090.00017.70
7.1.70.0060.00617.03
7.1.60.0170.02134.92
7.1.50.0160.01634.76
7.1.40.0180.01134.29
7.1.30.0180.01134.30
7.1.20.0180.01134.53
7.1.10.0000.01416.70
7.1.00.0000.01416.64
7.0.200.0100.00316.79
7.0.190.0070.00716.83
7.0.180.0090.01016.50
7.0.170.0030.00916.18
7.0.160.0070.00716.30
7.0.150.0340.00316.34
7.0.140.0050.00816.52
7.0.130.0070.00716.23
7.0.120.0030.01116.38
7.0.110.0070.00716.32
7.0.100.0240.01016.23
7.0.90.0090.00616.19
7.0.80.0030.01316.28
7.0.70.0280.01216.43
7.0.60.0030.01015.86
7.0.50.0110.00316.36
7.0.40.0030.01016.63
7.0.30.0000.01416.37
7.0.20.0080.00616.29
7.0.10.0160.00416.42
7.0.00.0040.01116.24

preferences:
36.73 ms | 400 KiB | 5 Q