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 ); var_dump($this); self::$_register[ $this->_id ] = &$this; // I also tried '= &$this' } function foo(){ // outputs 'id : value' echo $this->_id.' : ' . $this->_value. PHP_EOL; } function destroy() { unset($this); } } $test = new MyObject( 'hihi' ); $test->foo(); var_dump(MyObject::$_register); MyObject::$_register[0]->destroy(); var_dump($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.0060.00916.88
8.3.50.0220.01016.32
8.3.40.0100.01018.85
8.3.30.0000.01418.72
8.3.20.0030.00518.65
8.3.10.0090.00018.57
8.3.00.0000.01019.13
8.2.180.0070.01418.29
8.2.170.0120.00322.96
8.2.160.0030.01318.76
8.2.150.0030.00624.18
8.2.140.0110.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00721.00
8.2.110.0070.01121.04
8.2.100.0080.00817.75
8.2.90.0110.00019.07
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0040.00417.68
8.2.50.0000.00817.55
8.2.40.0000.00919.36
8.2.30.0030.00617.55
8.2.20.0030.00617.37
8.2.10.0000.00717.61
8.2.00.0060.00317.56
8.1.280.0090.00925.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.79
8.1.230.0080.00317.68
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.10
8.1.190.0060.00316.98
8.1.180.0000.00818.10
8.1.170.0030.00517.62
8.1.160.0000.00718.95
8.1.150.0040.00418.52
8.1.140.0040.00417.25
8.1.130.0030.00317.32
8.1.120.0070.00017.32
8.1.110.0040.00517.30
8.1.100.0000.00717.34
8.1.90.0000.00717.26
8.1.80.0000.00717.24
8.1.70.0070.00017.35
8.1.60.0000.00817.51
8.1.50.0040.00417.41
8.1.40.0030.00517.41
8.1.30.0000.00917.45
8.1.20.0040.00417.59
8.1.10.0000.00717.35
8.1.00.0000.00817.33
8.0.300.0050.00318.77
8.0.290.0080.00016.75
8.0.280.0040.00418.55
8.0.270.0040.00417.14
8.0.260.0080.00016.68
8.0.250.0040.00416.83
8.0.240.0000.00616.86
8.0.230.0030.00616.91
8.0.220.0040.00416.70
8.0.210.0000.00716.79
8.0.200.0000.00716.95
8.0.190.0000.00716.94
8.0.180.0070.00316.87
8.0.170.0040.00416.89
8.0.160.0050.00216.91
8.0.150.0000.00816.77
8.0.140.0000.00816.65
8.0.130.0060.00013.24
8.0.120.0030.00816.82
8.0.110.0000.00816.61
8.0.100.0060.00316.74
8.0.90.0000.00716.75
8.0.80.0060.00916.71
8.0.70.0070.00016.62
8.0.60.0000.00816.79
8.0.50.0000.00816.80
8.0.30.0120.00816.83
8.0.20.0120.01017.02
8.0.10.0040.00416.80
8.0.00.0150.00716.76
7.4.330.0000.00512.90
7.4.320.0030.00316.33
7.4.300.0030.00316.45
7.4.290.0030.00416.48
7.4.280.0000.00816.52
7.4.270.0000.00716.40
7.4.260.0060.00013.27
7.4.250.0040.00416.46
7.4.240.0030.00316.33
7.4.230.0040.00416.59
7.4.220.0120.00616.37
7.4.210.0030.00516.48
7.4.200.0030.00316.46
7.4.190.0050.00316.64
7.4.160.0100.00616.51
7.4.150.0070.01016.42
7.4.140.0030.01417.86
7.4.130.0070.01216.49
7.4.120.0050.01216.36
7.4.110.0110.01116.35
7.4.100.0100.01016.37
7.4.90.0100.00716.52
7.4.80.0040.01319.39
7.4.70.0070.01016.44
7.4.60.0040.01216.58
7.4.50.0030.00916.32
7.4.40.0000.01716.61
7.4.30.0100.00716.54
7.4.00.0080.00814.79
7.3.330.0000.00613.23
7.3.320.0000.00613.27
7.3.310.0060.00316.23
7.3.300.0060.00016.29
7.3.290.0060.00916.24
7.3.280.0060.01316.21
7.3.270.0100.00716.27
7.3.260.0090.00916.56
7.3.240.0110.00716.47
7.3.230.0070.01016.29
7.3.210.0110.00616.21
7.3.200.0070.01416.27
7.3.190.0060.00916.36
7.3.180.0040.01116.27
7.3.170.0170.00316.30
7.3.160.0090.00616.44
7.3.120.0040.01214.63
7.3.10.0070.01016.27
7.3.00.0030.01016.06
7.2.330.0130.00616.33
7.2.320.0150.00316.49
7.2.310.0170.00016.14
7.2.300.0100.00616.30
7.2.290.0060.01116.55
7.2.130.0080.00816.71
7.2.120.0060.00916.21
7.2.110.0100.00716.41
7.2.100.0070.00416.54
7.2.90.0030.01216.16
7.2.80.0070.00316.66
7.2.70.0120.00616.57
7.2.60.0530.00915.70
7.2.50.0070.00716.54
7.2.40.0040.01116.67
7.2.30.0120.00716.61
7.2.20.0140.00316.68
7.2.10.0060.00616.63
7.2.00.0070.00517.73
7.1.250.0120.00615.64
7.1.240.0030.00615.43
7.1.230.0090.00615.38
7.1.220.0170.00315.33
7.1.210.0030.01015.45
7.1.200.0050.00615.30
7.1.190.0060.00615.36
7.1.180.0000.01315.16
7.1.170.0070.00715.25
7.1.160.0030.01015.61
7.1.150.0070.00715.42
7.1.140.0000.00915.09
7.1.130.0040.00715.60
7.1.120.0030.00915.34
7.1.110.0060.00615.39
7.1.100.0070.00516.65
7.1.90.0000.01015.56
7.1.80.0050.00515.62
7.1.70.0020.00716.08
7.1.60.0110.00917.28
7.1.50.0060.00616.06
7.1.40.0080.00015.46
7.1.30.0050.00515.54
7.1.20.0070.00715.58
7.1.10.0090.00015.14
7.1.00.0060.02519.08
7.0.330.0070.00715.21
7.0.320.0100.00315.07
7.0.310.0070.00315.32
7.0.300.0110.00315.18
7.0.290.0030.01015.17
7.0.280.0060.00615.26
7.0.270.0080.00315.19
7.0.260.0040.00815.14
7.0.250.0000.01715.37
7.0.240.0090.00615.22
7.0.230.0090.00615.25
7.0.220.0000.01115.03
7.0.210.0070.00715.27
7.0.200.0050.00615.98
7.0.190.0040.01115.16
7.0.180.0090.00415.07
7.0.170.0110.00615.25
7.0.160.0030.01015.17
7.0.150.0040.00415.37
7.0.140.0020.04118.67
7.0.130.0060.00615.35
7.0.120.0000.04218.79
7.0.110.0030.03618.71
7.0.100.0050.03018.70
7.0.90.0090.02218.70
7.0.80.0030.04118.69
7.0.70.0000.03018.69
7.0.60.0070.03818.71
7.0.50.0100.03118.78
7.0.40.0030.03717.54
7.0.30.0050.02017.66
7.0.20.0020.01917.73
7.0.10.0040.02417.80
7.0.00.0040.03017.57
5.6.380.0000.01214.30
5.6.370.0070.00314.08
5.6.360.0070.00314.27
5.6.350.0060.00314.27
5.6.340.0070.01014.03
5.6.330.0090.00614.00
5.6.320.0040.00413.83
5.6.310.0060.00914.28
5.6.300.0070.00714.23
5.6.290.0030.00914.31
5.6.280.0070.03817.55
5.6.270.0000.01613.95
5.6.260.0070.03317.66
5.6.250.0030.03217.41
5.6.240.0050.02517.73
5.6.230.0040.03017.38
5.6.220.0060.01817.49
5.6.210.0020.02717.62
5.6.200.0090.03617.64
5.6.190.0080.03017.39
5.6.180.0080.02317.67
5.6.170.0000.02317.63
5.6.160.0070.02717.59
5.6.150.0000.02817.82
5.6.140.0000.02817.68
5.6.130.0120.03317.70
5.6.120.0090.03817.59
5.6.110.0060.03317.73
5.6.100.0020.02717.76
5.6.90.0000.02517.46
5.6.80.0040.02017.24
5.6.70.0080.01317.38
5.6.60.0030.01817.17
5.6.50.0050.01917.17
5.6.40.0040.03417.36
5.6.30.0060.02617.35
5.6.20.0020.04217.16
5.6.10.0040.02717.16
5.6.00.0080.01817.24
5.5.380.0000.02314.32
5.5.370.0060.02114.23
5.5.360.0020.02414.27
5.5.350.0060.02614.35
5.5.340.0040.02514.64
5.5.330.0030.03514.55
5.5.320.0000.02114.73
5.5.310.0050.01614.60
5.5.300.0000.02014.70
5.5.290.0100.02214.60
5.5.280.0020.03714.81
5.5.270.0030.03714.41
5.5.260.0010.03214.59
5.5.250.0060.01614.65
5.5.240.0020.02014.24
5.5.230.0020.01914.39
5.5.220.0030.02614.20
5.5.210.0020.02414.31
5.5.200.0060.02114.19
5.5.190.0030.02614.16
5.5.180.0020.03814.13
5.5.170.0060.00311.18
5.5.160.0020.02014.36
5.5.150.0070.01514.11
5.5.140.0020.01814.29
5.5.130.0030.02514.36
5.5.120.0020.02514.32
5.5.110.0050.01914.13
5.5.100.0030.01914.08
5.5.90.0020.02014.24
5.5.80.0050.02214.28
5.5.70.0020.03014.33
5.5.60.0070.01814.21
5.5.50.0020.01914.08
5.5.40.0050.01614.18
5.5.30.0020.01714.06
5.5.20.0080.01714.27
5.5.10.0050.02314.25
5.5.00.0030.02214.21
5.4.450.0030.02115.41
5.4.440.0040.03715.36
5.4.430.0060.03515.40
5.4.420.0020.03015.10
5.4.410.0030.01815.12
5.4.400.0020.02014.97
5.4.390.0020.02014.88
5.4.380.0050.01715.08
5.4.370.0020.02614.86
5.4.360.0000.02214.87
5.4.350.0040.02015.09
5.4.340.0040.02915.12
5.4.330.0060.00611.14
5.4.320.0050.01815.07
5.4.310.0010.01815.08
5.4.300.0030.01715.03
5.4.290.0030.01815.10
5.4.280.0060.02315.03
5.4.270.0020.02415.25
5.4.260.0030.01815.04
5.4.250.0060.01615.04
5.4.240.0000.02015.03
5.4.230.0000.02214.89
5.4.220.0030.02815.01
5.4.210.0020.01814.85
5.4.200.0040.01515.04
5.4.190.0010.01914.98
5.4.180.0000.02914.90
5.4.170.0030.01714.82
5.4.160.0020.02014.96
5.4.150.0020.04015.11
5.4.140.0000.02613.73
5.4.130.0020.02513.84
5.4.120.0000.02113.75
5.4.110.0030.01813.90
5.4.100.0050.02713.62
5.4.90.0010.02913.82
5.4.80.0040.02813.72
5.4.70.0050.03113.75
5.4.60.0030.03313.81
5.4.50.0020.02113.47
5.4.40.0060.02313.70
5.4.30.0020.02413.68
5.4.20.0030.02413.67
5.4.10.0000.02413.65
5.4.00.0050.01813.35
5.3.290.0000.02112.65
5.3.280.0020.02712.72
5.3.270.0050.02212.66
5.3.260.0030.01912.66
5.3.250.0030.03612.65
5.3.240.0030.02712.66
5.3.230.0020.02212.65
5.3.220.0010.01812.71
5.3.210.0000.02512.57
5.3.200.0030.01912.64
5.3.190.0030.02812.65
5.3.180.0060.03712.67
5.3.170.0030.02312.64
5.3.160.0060.02812.73
5.3.150.0000.03712.70
5.3.140.0040.02812.63
5.3.130.0030.02612.64
5.3.120.0020.03512.61
5.3.110.0020.02812.67
5.3.100.0050.02412.39
5.3.90.0040.03712.38
5.3.80.0000.03712.37
5.3.70.0050.03312.39
5.3.60.0060.03212.37
5.3.50.0020.03012.44
5.3.40.0020.02712.34
5.3.30.0040.01712.24
5.3.20.0020.01812.13
5.3.10.0020.01512.30
5.3.00.0030.01512.18
5.2.170.0020.02510.97
5.2.160.0040.02810.97
5.2.150.0000.02210.94
5.2.140.0020.01610.97
5.2.130.0040.01110.91
5.2.120.0010.01310.93
5.2.110.0020.01410.95
5.2.100.0000.01410.97
5.2.90.0020.01310.92
5.2.80.0010.02010.92
5.2.70.0000.02410.90
5.2.60.0040.01810.88
5.2.50.0020.01710.90
5.2.40.0010.02010.89
5.2.30.0000.02010.85
5.2.20.0020.01310.84
5.2.10.0030.01310.82
5.2.00.0040.01210.71
5.1.60.0000.01210.49
5.1.50.0030.01210.49
5.1.40.0050.00810.49
5.1.30.0020.01110.57
5.1.20.0020.01410.51
5.1.10.0020.01410.49
5.1.00.0000.01410.49
5.0.50.0000.01610.49
5.0.40.0030.01310.49
5.0.30.0000.01710.49
5.0.20.0030.00810.49
5.0.10.0000.01110.49
5.0.00.0000.01910.49
4.4.90.0030.01010.49
4.4.80.0010.01310.49
4.4.70.0030.00810.49
4.4.60.0000.01010.49
4.4.50.0020.00810.49
4.4.40.0020.01210.49
4.4.30.0020.00810.49
4.4.20.0020.00710.49
4.4.10.0020.00810.49
4.4.00.0040.01210.49
4.3.110.0000.01010.49
4.3.100.0050.00710.49
4.3.90.0020.00810.49
4.3.80.0020.02010.49
4.3.70.0020.01010.49
4.3.60.0020.00910.49
4.3.50.0020.01010.49
4.3.40.0020.01210.49
4.3.30.0020.01110.49
4.3.20.0020.00810.49
4.3.10.0030.01110.49
4.3.00.0010.01310.49

preferences:
42.89 ms | 401 KiB | 5 Q