3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class A { public $property; public function __construct( $prop ) { $this->property = $prop; } public function returnValue(){ return static::${this->property}; } } Class B extends A { public static $property_one = 'This is first property'; public static $property_two = 'This is second property'; } $B = new B( 'property_one' ); $B->returnValue();

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.0000.01418.56
8.3.50.0150.00321.14
8.3.40.0100.00718.90
8.3.30.0040.01120.33
8.3.20.0000.00820.34
8.3.10.0080.00021.04
8.3.00.0000.00822.44
8.2.180.0070.01016.63
8.2.170.0110.00322.96
8.2.160.0070.00722.21
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0030.00520.77
8.2.110.0080.00422.11
8.2.100.0030.00618.72
8.1.280.0180.00025.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00618.42
8.1.230.0060.00318.46
5.4.220.0250.05612.40
5.4.210.0210.06512.40
5.4.200.0230.06312.40
5.4.190.0210.06312.39
5.4.180.0120.04112.39
5.4.170.0160.06812.40
5.4.160.0190.06712.39
5.4.150.0170.05212.39
5.4.140.0220.06212.08
5.4.130.0160.04412.06
5.4.120.0260.06412.03
5.4.110.0100.04612.03
5.4.100.0260.06312.03
5.4.90.0110.04312.03
5.4.80.0130.04212.03
5.4.70.0130.04312.02
5.4.60.0140.04012.02
5.4.50.0140.04112.02
5.4.40.0360.06212.01
5.4.30.0160.08012.01
5.4.20.0160.04512.00
5.4.10.0100.04512.00
5.4.00.0230.06111.50
5.3.270.0210.07612.72
5.3.260.0220.04312.72
5.3.250.0130.04712.72
5.3.240.0160.06912.72
5.3.230.0150.04512.71
5.3.220.0130.04212.68
5.3.210.0210.06512.68
5.3.200.0410.05612.68
5.3.190.0230.06512.68
5.3.180.0130.04612.67
5.3.170.0160.04312.67
5.3.160.0260.06012.67
5.3.150.0270.06512.67
5.3.140.0140.04312.66
5.3.130.0160.04712.66
5.3.120.0220.06512.65
5.3.110.0130.04712.65
5.3.100.0180.05612.12
5.3.90.0250.06312.10
5.3.80.0130.04512.09
5.3.70.0250.06012.08
5.3.60.0240.06512.07
5.3.50.0250.06412.02
5.3.40.0270.07312.02
5.3.30.0120.04611.98
5.3.20.0130.04311.76
5.3.10.0130.04111.72
5.3.00.0250.03411.70

preferences:
32.01 ms | 401 KiB | 5 Q