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 __destruct() { } } $test = new MyObject( 'hihi' ); $test->foo(); var_dump(MyObject::$_register); MyObject::$_register[0]->__destruct(); 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.00918.52
8.3.50.0230.00717.29
8.3.40.0090.00618.84
8.3.30.0110.00718.84
8.3.20.0040.00418.48
8.3.10.0030.00618.91
8.3.00.0070.00319.50
8.2.180.0060.00916.88
8.2.170.0120.00322.96
8.2.160.0200.00018.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00020.96
8.2.110.0100.00722.08
8.2.100.0030.00917.78
8.2.90.0050.00317.75
8.2.80.0050.00518.48
8.2.70.0090.00017.75
8.2.60.0040.00417.50
8.2.50.0040.00418.05
8.2.40.0030.00519.35
8.2.30.0080.00017.82
8.2.20.0040.00717.74
8.2.10.0040.00417.74
8.2.00.0050.00317.75
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0160.00623.90
8.1.230.0110.00019.24
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0000.00817.36
8.1.180.0000.00918.10
8.1.170.0080.00017.62
8.1.160.0070.00018.98
8.1.150.0000.00718.66
8.1.140.0000.00717.45
8.1.130.0050.00219.16
8.1.120.0050.00217.47
8.1.110.0040.00417.45
8.1.100.0040.00417.51
8.1.90.0000.00717.37
8.1.80.0000.00717.47
8.1.70.0030.00317.49
8.1.60.0050.00317.50
8.1.50.0000.00717.36
8.1.40.0040.00417.50
8.1.30.0030.00517.64
8.1.20.0040.00417.59
8.1.10.0040.00417.46
8.1.00.0000.00817.40
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0070.00018.56
8.0.270.0000.00717.32
8.0.260.0060.00018.52
8.0.250.0040.00416.95
8.0.240.0050.00317.00
8.0.230.0000.00817.00
8.0.220.0030.00316.88
8.0.210.0040.00416.90
8.0.200.0000.00716.85
8.0.190.0000.00716.96
8.0.180.0040.00716.81
8.0.170.0090.00016.96
8.0.160.0030.00316.86
8.0.150.0000.00916.80
8.0.140.0040.00416.90
8.0.130.0000.00713.28
8.0.120.0060.00316.89
8.0.110.0000.00816.86
8.0.100.0050.00316.89
8.0.90.0040.00416.74
8.0.80.0140.00016.96
8.0.70.0050.00216.92
8.0.60.0000.00816.87
8.0.50.0080.00016.89
8.0.30.0100.00517.20
8.0.20.0060.01216.92
8.0.10.0080.00017.01
8.0.00.0100.01016.75
7.4.330.0020.00212.91
7.4.320.0080.00016.46
7.4.300.0000.00716.59
7.4.290.0040.00416.55
7.4.280.0050.00316.59
7.4.270.0040.00416.62
7.4.260.0000.00513.18
7.4.250.0030.00516.59
7.4.240.0000.00716.46
7.4.230.0000.00716.62
7.4.220.0090.01016.53
7.4.210.0110.00716.48
7.4.200.0050.00216.54
7.4.190.0000.00816.52
7.4.160.0070.01016.34
7.4.150.0130.00616.46
7.4.140.0150.00317.86
7.4.130.0090.01716.54
7.4.120.0100.00716.41
7.4.110.0090.01516.58
7.4.100.0060.01216.35
7.4.90.0130.01016.52
7.4.80.0030.01319.39
7.4.70.0110.00516.59
7.4.60.0140.00316.42
7.4.50.0070.00016.36
7.4.40.0060.00916.50
7.4.30.0110.00816.52
7.4.00.0060.01215.07
7.3.330.0030.00313.45
7.3.320.0040.00413.34
7.3.310.0030.00316.46
7.3.300.0000.00716.32
7.3.290.0070.00816.39
7.3.280.0090.00616.39
7.3.270.0070.01016.64
7.3.260.0110.01116.55
7.3.240.0100.00616.59
7.3.230.0060.01116.44
7.3.210.0120.00616.57
7.3.200.0160.00316.39
7.3.190.0070.01016.51
7.3.180.0080.00816.45
7.3.170.0090.00916.61
7.3.160.0100.00716.47
7.3.120.0070.01014.82
7.2.330.0170.00316.58
7.2.320.0030.02016.83
7.2.310.0140.00316.82
7.2.300.0100.00716.42
7.2.290.0130.01016.59
7.2.60.0140.00717.01
7.2.50.0260.01016.99
7.1.200.0070.00715.94
7.1.100.0060.00918.18
7.1.70.0000.00717.25
7.1.60.0090.00919.25
7.1.50.0090.00317.08
7.1.00.0030.04022.45
7.0.200.0080.00016.86
7.0.140.0000.07721.95
7.0.120.0000.07722.13
7.0.60.0170.07719.82
7.0.50.0070.08317.75
7.0.40.0300.06720.14
7.0.30.0230.06020.32
7.0.20.0300.07320.30
7.0.10.0270.08720.18
7.0.00.0170.04320.25
5.6.280.0030.07321.13
5.6.210.0100.08020.45
5.6.200.0070.08018.16
5.6.190.0300.07320.55
5.6.180.0370.04720.33
5.6.170.0230.05020.63
5.6.160.0200.08720.52
5.6.150.0270.08020.20
5.6.140.0170.09020.18
5.6.130.0200.07720.19
5.6.120.0170.07320.23
5.6.110.0230.03320.40
5.6.100.0170.07320.49
5.6.90.0170.04720.52
5.6.80.0230.07719.81
5.6.70.0170.04019.55
5.6.60.0170.03719.54
5.6.50.0070.05719.76
5.6.40.0130.04319.70
5.6.30.0130.04319.55
5.6.20.0170.04019.53
5.6.10.0130.04019.76
5.6.00.0100.04319.88
5.5.350.0130.05720.42
5.5.340.0070.06317.98
5.5.330.0300.05320.13
5.5.320.0270.08020.22
5.5.310.0230.03720.45
5.5.300.0300.07719.97
5.5.290.0270.07020.21
5.5.280.0170.07020.23
5.5.270.0200.08319.96
5.5.260.0270.05719.97
5.5.250.0300.07719.79
5.5.240.0170.04019.60
5.5.230.0230.03019.61
5.5.220.0170.03719.41
5.5.210.0200.04019.68
5.5.200.0070.04319.33
5.5.190.0130.04019.39
5.5.180.0200.03319.34
5.5.160.0200.03319.69
5.5.150.0100.04319.33
5.5.140.0130.04019.67
5.5.130.0130.04019.55
5.5.120.0100.04019.32
5.5.110.0100.04319.33
5.5.100.0100.04319.50
5.5.90.0100.04319.22
5.5.80.0130.04719.55
5.5.70.0330.02019.21
5.5.60.0170.03719.45
5.5.50.0100.04019.21
5.5.40.0200.03719.27
5.5.30.0200.03319.47
5.5.20.0170.04019.61
5.5.10.0070.04319.20
5.5.00.0170.08019.59
5.4.450.0370.06319.20
5.4.440.0170.08319.32
5.4.430.0300.04319.30
5.4.420.0230.07319.43
5.4.410.0230.04719.27
5.4.400.0070.04719.25
5.4.390.0100.04019.24
5.4.380.0130.03719.25
5.4.370.0200.03719.25
5.4.360.0170.03718.86
5.4.350.0170.03319.15
5.4.340.0170.03318.85
5.4.320.0130.03719.08
5.4.310.0230.03319.25
5.4.300.0130.04319.24
5.4.290.0130.03719.24
5.4.280.0200.03319.25
5.4.270.0200.03319.15
5.4.260.0100.04019.14
5.4.250.0070.04319.15
5.4.240.0170.03318.87
5.4.230.0170.04018.85
5.4.220.0230.06319.11
5.4.210.0200.03318.94
5.4.200.0170.03319.24
5.4.190.0200.03019.24
5.4.180.0230.02718.96
5.4.170.0200.04018.91
5.4.160.0170.04018.84
5.4.150.0300.06719.13
5.4.140.0170.08016.45
5.4.130.0230.04316.38
5.4.120.0270.06716.40
5.4.110.0170.04016.41
5.4.100.0170.08016.31
5.4.90.0270.06316.39
5.4.80.0230.04716.38
5.4.70.0170.04316.42
5.4.60.0170.06016.27
5.4.50.0230.06716.37
5.4.40.0330.06016.43
5.4.30.0330.06316.31
5.4.20.0130.04316.30
5.4.10.0200.05716.39
5.4.00.0230.07715.86
5.3.290.0200.03014.68
5.3.280.0170.04014.67
5.3.270.0170.04014.64
5.3.260.0270.06714.68
5.3.250.0170.06314.76
5.3.240.0270.04314.67
5.3.230.0200.04014.62
5.3.220.0070.05014.46
5.3.210.0130.04014.61
5.3.200.0270.03014.61
5.3.190.0230.07014.46
5.3.180.0330.06014.72
5.3.170.0270.06014.73
5.3.160.0300.06014.63
5.3.150.0370.05714.73
5.3.140.0270.06014.56
5.3.130.0470.06014.56
5.3.120.0170.06714.44
5.3.110.0130.07714.61
5.3.100.0230.07314.05
5.3.90.0270.04014.18
5.3.80.0230.07313.97
5.3.70.0200.03714.04
5.3.60.0200.04314.03
5.3.50.0300.07313.84
5.3.40.0330.06013.90
5.3.30.0200.03313.82
5.3.20.0230.07013.70
5.3.10.0200.06313.66
5.3.00.0200.07013.61
5.2.170.0130.06312.66
5.2.160.0100.05012.66
5.2.150.0200.03012.66
5.2.140.0230.06012.66
5.2.130.0270.04012.66
5.2.120.0200.06012.66
5.2.110.0170.05712.66
5.2.100.0170.06012.66
5.2.90.0170.06012.66
5.2.80.0170.04012.66
5.2.70.0070.04012.66
5.2.60.0130.03012.66
5.2.50.0130.04712.66
5.2.40.0170.03012.66
5.2.30.0200.05312.66
5.2.20.0100.03312.66
5.2.10.0230.03312.66
5.2.00.0270.06012.66
5.1.60.0170.05312.66
5.1.50.0130.05712.66
5.1.40.0200.04712.66
5.1.30.0230.04712.66
5.1.20.0270.04012.66
5.1.10.0200.05312.66
5.1.00.0270.04012.66
5.0.50.0100.04012.66
5.0.40.0070.02012.66
5.0.30.0070.06012.66
5.0.20.0130.04012.66
5.0.10.0100.04312.66
5.0.00.0030.05012.66
4.4.90.0070.02012.66
4.4.80.0100.02712.66
4.4.70.0100.01012.66
4.4.60.0000.03712.66
4.4.50.0100.02312.66
4.4.40.0100.05312.66
4.4.30.0070.04012.66
4.4.20.0100.03312.66
4.4.10.0070.02312.66
4.4.00.0030.03012.66
4.3.110.0100.03312.66
4.3.100.0070.03712.66
4.3.90.0100.03312.66
4.3.80.0130.05012.66
4.3.70.0070.03312.66
4.3.60.0100.03012.66
4.3.50.0130.03012.66
4.3.40.0070.04312.66
4.3.30.0100.01712.66
4.3.20.0070.03312.66
4.3.10.0070.03312.66
4.3.00.0070.01712.66

preferences:
50.39 ms | 401 KiB | 5 Q