3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyObject{ public static $_register = array(); public $_id = -1; public $_value = ''; function __construct( $value ){ $this->_value = $value; $this->_id = count( self::$_register ); self::$_register[ $this->_id ] =& $this; // I also tried '= &$this' } function foo(){ // outputs 'id : value' echo $this->_id.' : ' . $this->_value . '<br />'; } } $test = new MyObject( 'hihi' ); $test->foo();

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.01516.88
8.3.50.0140.00417.45
8.3.40.0110.01118.79
8.3.30.0090.00618.71
8.3.20.0080.00018.77
8.3.10.0050.00318.75
8.3.00.0070.00319.50
8.2.180.0060.01616.63
8.2.170.0070.00722.96
8.2.160.0060.01018.91
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0070.00021.04
8.2.110.0060.00320.47
8.2.100.0100.00017.91
8.2.90.0000.00817.88
8.2.80.0060.00318.73
8.2.70.0060.00317.63
8.2.60.0030.00618.05
8.2.50.0000.00817.93
8.2.40.0030.00519.47
8.2.30.0060.00317.80
8.2.20.0070.00417.65
8.2.10.0030.00617.61
8.2.00.0040.00417.71
8.1.280.0140.00325.92
8.1.270.0000.00823.99
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00018.84
8.1.230.0040.00717.83
8.1.220.0030.00517.76
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0040.00417.22
8.1.180.0030.00618.10
8.1.170.0080.00017.62
8.1.160.0040.00418.94
8.1.150.0000.00718.50
8.1.140.0040.00417.43
8.1.130.0030.00317.45
8.1.120.0000.00717.38
8.1.110.0070.00017.42
8.1.100.0050.00217.43
8.1.90.0000.00717.45
8.1.80.0040.00417.35
8.1.70.0000.00717.36
8.1.60.0040.00417.63
8.1.50.0000.00817.36
8.1.40.0080.00017.40
8.1.30.0030.00517.49
8.1.20.0040.00417.63
8.1.10.0070.00017.54
8.1.00.0040.00417.47
8.0.300.0080.00018.77
8.0.290.0040.00716.88
8.0.280.0040.00418.56
8.0.270.0080.00017.24
8.0.260.0000.00616.89
8.0.250.0040.00416.82
8.0.240.0070.00016.99
8.0.230.0040.00416.81
8.0.220.0020.00516.80
8.0.210.0040.00416.92
8.0.200.0030.00316.98
8.0.190.0000.00716.97
8.0.180.0040.00716.88
8.0.170.0060.00316.89
8.0.160.0000.00716.84
8.0.150.0000.00916.73
8.0.140.0000.00816.75
8.0.130.0000.00613.35
8.0.120.0030.00816.88
8.0.110.0040.00416.83
8.0.100.0000.00716.83
8.0.90.0040.00416.68
8.0.80.0040.01116.86
8.0.70.0070.00016.77
8.0.60.0040.00416.76
8.0.50.0040.00416.86
8.0.30.0030.01317.15
8.0.20.0090.01017.21
8.0.10.0070.00017.00
8.0.00.0110.01116.63
7.4.330.0050.00012.92
7.4.320.0000.00616.50
7.4.300.0070.00016.48
7.4.290.0060.00316.48
7.4.280.0050.00216.63
7.4.270.0070.00016.50
7.4.260.0030.00313.32
7.4.250.0040.00416.50
7.4.240.0070.00016.52
7.4.230.0050.00216.67
7.4.220.0110.00816.61
7.4.210.0060.01116.43
7.4.200.0000.00816.59
7.4.190.0000.00816.54
7.4.160.0130.00316.60
7.4.150.0070.01116.51
7.4.140.0100.00717.86
7.4.130.0030.01516.60
7.4.120.0100.00716.55
7.4.110.0170.00416.56
7.4.100.0110.01016.58
7.4.90.0060.01216.52
7.4.80.0100.00719.39
7.4.70.0160.00416.48
7.4.60.0060.00916.48
7.4.50.0000.00916.48
7.4.40.0060.00916.47
7.4.30.0130.01016.44
7.4.10.0110.00414.89
7.4.00.0080.00814.84
7.3.330.0030.00313.23
7.3.320.0050.00013.30
7.3.310.0030.00516.45
7.3.300.0070.00016.23
7.3.290.0050.00916.35
7.3.280.0070.00716.32
7.3.270.0080.00816.36
7.3.260.0140.00516.38
7.3.240.0110.00516.59
7.3.230.0190.00316.50
7.3.210.0070.01016.40
7.3.200.0160.00416.46
7.3.190.0120.00416.38
7.3.180.0090.00616.43
7.3.170.0140.01016.37
7.3.160.0070.01016.27
7.3.130.0060.01214.95
7.3.120.0070.00814.98
7.3.110.0050.01214.82
7.3.100.0070.00714.67
7.3.90.0090.00314.89
7.3.80.0060.00414.85
7.3.70.0070.00714.58
7.3.60.0060.00614.94
7.3.50.0040.00714.85
7.3.40.0060.00914.70
7.3.30.0050.00714.91
7.3.20.0060.00816.63
7.3.10.0080.00516.80
7.3.00.0030.00916.62
7.2.330.0060.01216.75
7.2.320.0030.01416.82
7.2.310.0130.01016.81
7.2.300.0080.00916.50
7.2.290.0090.00916.45
7.2.260.0040.00914.97
7.2.250.0090.00814.94
7.2.240.0060.01115.25
7.2.230.0050.01214.85
7.2.220.0050.00915.02
7.2.210.0040.00915.10
7.2.200.0020.01214.94
7.2.190.0070.00714.95
7.2.180.0030.01015.04
7.2.170.0070.00715.13
7.2.160.0030.01214.84
7.2.150.0050.01216.78
7.2.140.0090.00816.99
7.2.130.0070.00716.90
7.2.120.0070.00817.04
7.2.110.0020.01216.82
7.2.100.0070.00517.04
7.2.90.0040.01117.03
7.2.80.0050.00816.90
7.2.70.0050.00517.01
7.2.60.0100.00416.87
7.2.50.0050.01016.91
7.2.40.0070.00916.88
7.2.30.0090.00517.03
7.2.20.0080.00617.10
7.2.10.0030.00917.12
7.2.00.0080.00717.73
7.1.330.0050.01115.80
7.1.320.0040.00915.78
7.1.310.0020.00915.80
7.1.300.0050.00715.85
7.1.290.0070.00915.63
7.1.280.0060.00615.51
7.1.270.0050.00815.97
7.1.260.0040.00815.86
7.1.250.0030.01015.69
7.1.240.0030.01115.81
7.1.230.0000.01415.63
7.1.220.0030.00715.79
7.1.210.0030.01015.67
7.1.200.0110.00215.75
7.1.190.0000.00915.86
7.1.180.0050.00515.66
7.1.170.0020.01215.76
7.1.160.0020.01115.80
7.1.150.0040.00815.87
7.1.140.0060.00815.81
7.1.130.0100.00315.77
7.1.120.0060.00615.85
7.1.110.0040.00715.82
7.1.100.0070.00816.36
7.1.90.0040.00615.61
7.1.80.0060.00515.92
7.1.70.0040.00716.24
7.1.60.0070.01016.86
7.1.50.0060.01016.18
7.1.40.0030.00915.82
7.1.30.0020.01215.71
7.1.20.0100.00515.64
7.1.10.0050.01015.71
7.1.00.0060.01417.91
7.0.330.0030.00915.30
7.0.320.0030.00815.44
7.0.310.0090.00415.35
7.0.300.0070.00715.38
7.0.290.0050.00615.24
7.0.280.0000.01015.38
7.0.270.0070.00715.42
7.0.260.0060.00415.33
7.0.250.0020.01015.54
7.0.240.0070.00515.47
7.0.230.0040.00815.25
7.0.220.0060.00515.19
7.0.210.0050.00915.42
7.0.200.0050.00715.73
7.0.190.0050.01015.27
7.0.180.0030.00815.33
7.0.170.0020.00915.30
7.0.160.0070.00615.38
7.0.150.0060.00615.42
7.0.140.0030.02917.60
7.0.130.0060.00615.33
7.0.120.0050.02917.67
7.0.110.0070.00415.38
7.0.100.0050.00615.39
7.0.90.0060.00815.46
7.0.80.0070.00615.40
7.0.70.0090.00315.46
7.0.60.0030.02816.94
7.0.50.0040.01616.15
7.0.40.0080.01314.95
7.0.30.0020.02114.87
7.0.20.0050.01914.88
7.0.10.0010.02114.77
7.0.00.0050.01714.88
5.6.400.0050.00914.54
5.6.390.0050.00814.25
5.6.380.0070.00414.55
5.6.370.0060.00614.52
5.6.360.0050.00714.26
5.6.350.0070.00814.48
5.6.340.0020.01214.48
5.6.330.0060.00714.52
5.6.320.0010.01014.09
5.6.310.0070.00514.49
5.6.300.0080.00714.35
5.6.290.0060.00714.36
5.6.280.0040.02816.71
5.6.270.0010.00714.67
5.6.260.0020.01014.46
5.6.250.0040.01114.31
5.6.240.0080.00814.45
5.6.230.0040.01114.45
5.6.220.0070.00714.49
5.6.210.0030.02616.37
5.6.200.0060.01515.75
5.6.190.0070.01515.59
5.6.180.0030.01815.88
5.6.170.0040.01815.62
5.6.160.0070.01815.63
5.6.150.0050.01615.68
5.6.140.0030.01915.74
5.6.130.0030.02115.92
5.6.120.0020.02415.73
5.6.110.0040.02115.63
5.6.100.0080.01915.82
5.6.90.0060.03115.88
5.6.80.0030.03415.40
5.6.70.0040.03215.35
5.6.60.0050.03315.47
5.6.50.0090.02715.48
5.6.40.0030.03515.38
5.6.30.0090.02815.34
5.6.20.0060.03115.52
5.6.10.0060.02915.54
5.6.00.0040.03315.46
5.5.380.0060.00914.59
5.5.370.0040.01114.40
5.5.360.0030.00814.32
5.5.350.0080.02316.47
5.5.340.0020.01815.47
5.5.330.0020.02115.46
5.5.320.0040.01615.51
5.5.310.0060.01615.72
5.5.300.0020.01915.51
5.5.290.0040.01715.50
5.5.280.0090.01215.68
5.5.270.0060.01715.54
5.5.260.0010.03015.59
5.5.250.0070.03115.53
5.5.240.0090.02715.46
5.5.230.0080.02815.35
5.5.220.0030.03315.40
5.5.210.0050.02715.27
5.5.200.0060.01715.31
5.5.190.0030.03215.35
5.5.180.0070.03115.36
5.5.170.0040.00914.45
5.5.160.0070.02715.39
5.5.150.0050.03315.42
5.5.140.0060.02815.40
5.5.130.0080.01915.33
5.5.120.0030.02915.23
5.5.110.0080.02515.34
5.5.100.0040.01915.41
5.5.90.0040.01915.28
5.5.80.0080.02915.35
5.5.70.0060.02615.37
5.5.60.0080.01715.15
5.5.50.0030.02215.14
5.5.40.0080.02315.21
5.5.30.0090.02815.30
5.5.20.0060.01815.27
5.5.10.0080.01615.21
5.5.00.0010.02515.20
5.4.450.0030.01914.40
5.4.440.0030.01714.39
5.4.430.0010.01714.38
5.4.420.0020.02314.39
5.4.410.0050.03014.34
5.4.400.0040.03214.29
5.4.390.0050.02814.30
5.4.380.0070.02914.27
5.4.370.0050.02814.27
5.4.360.0040.02114.25
5.4.350.0020.03114.27
5.4.340.0060.02614.29
5.4.330.0060.00511.90
5.4.320.0030.01814.25
5.4.310.0050.03114.29
5.4.300.0060.02414.23
5.4.290.0050.01614.36
5.4.280.0050.01514.28
5.4.270.0060.02814.28
5.4.260.0030.02714.23
5.4.250.0070.01614.28
5.4.240.0070.01914.29
5.4.230.0070.01814.30
5.4.220.0080.01814.30
5.4.210.0020.02114.29
5.4.200.0070.01714.23
5.4.190.0040.01714.23
5.4.180.0100.02914.31
5.4.170.0040.02014.23
5.4.160.0100.01914.29
5.4.150.0070.02814.22
5.4.140.0010.02713.46
5.4.130.0030.02113.40
5.4.120.0030.03113.37
5.4.110.0060.02413.45
5.4.100.0060.01413.38
5.4.90.0020.01813.41
5.4.80.0020.03113.41
5.4.70.0050.02113.42
5.4.60.0050.02613.42
5.4.50.0060.02313.39
5.4.40.0040.02513.42
5.4.30.0060.02613.45
5.4.20.0030.02013.37
5.4.10.0030.02713.34
5.4.00.0060.01613.26
5.3.290.0050.02312.81
5.3.280.0010.01912.82
5.3.270.0020.01812.83
5.3.260.0100.02112.80
5.3.250.0080.02612.82
5.3.240.0020.02112.81
5.3.230.0060.01912.79
5.3.220.0100.02512.79
5.3.210.0040.02812.82
5.3.200.0050.01612.78
5.3.190.0070.02712.74
5.3.180.0060.02012.86
5.3.170.0020.02912.86
5.3.160.0060.01612.79
5.3.150.0050.02712.81
5.3.140.0070.02412.81
5.3.130.0050.02412.81
5.3.120.0010.01812.79
5.3.110.0020.03112.78
5.3.100.0020.01712.62
5.3.90.0020.02012.63
5.3.80.0040.01712.63
5.3.70.0070.02512.63
5.3.60.0060.02012.60
5.3.50.0080.02412.61
5.3.40.0030.01712.66
5.3.30.0050.01312.58
5.3.20.0040.01612.54
5.3.10.0010.03012.51
5.3.00.0040.01912.50
5.2.170.0100.03011.04
5.2.160.0000.04011.14
5.2.150.0000.03011.15
5.2.140.0030.03011.22
5.2.130.0070.03311.11
5.2.120.0070.04011.11
5.2.110.0170.03010.96
5.2.100.0000.05010.95
5.2.90.0030.06710.95
5.2.80.0100.02311.12
5.2.70.0070.06311.13
5.2.60.0030.04711.15
5.2.50.0000.03311.03
5.2.40.0000.03311.04
5.2.30.0000.03010.82
5.2.20.0070.06310.96
5.2.10.0030.02710.87
5.2.00.0000.03710.79
5.1.60.0030.02710.05
5.1.50.0070.05010.05
5.1.40.0030.04310.01
5.1.30.0030.03710.34
5.1.20.0030.05010.26
5.1.10.0070.04310.29
5.1.00.0070.04010.04
5.0.50.0030.0438.59
5.0.40.0030.0438.25
5.0.30.0030.0678.43
5.0.20.0000.0478.25
5.0.10.0100.0378.16
5.0.00.0030.0578.13
4.4.90.0100.0237.55
4.4.80.0070.0137.55
4.4.70.0000.0407.55
4.4.60.0030.0137.55
4.4.50.0030.0137.55
4.4.40.0030.0237.55
4.4.30.0070.0207.55
4.4.20.0000.0377.55
4.4.10.0000.0377.55
4.4.00.0000.0407.55
4.3.110.0000.0377.55
4.3.100.0030.0337.55
4.3.90.0000.0277.55
4.3.80.0000.0577.55
4.3.70.0070.0337.55
4.3.60.0030.0377.55
4.3.50.0030.0277.55
4.3.40.0030.0307.55
4.3.30.0070.0337.55
4.3.20.0000.0377.55
4.3.10.0030.0377.55
4.3.00.0000.0377.55

preferences:
50.9 ms | 401 KiB | 5 Q