3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f_test(&$obj) { $obj->prop++; echo "prop=".$obj->prop." <br>\r\n"; } class clsTest { public $prop = 0; public $arg_array = false; function meth() { if ($this->arg_array===false) $this->arg_array = array(&$this); echo 'arg_array[0] '.(($this->arg_array[0]===$this) ? ' is the same instance' : ' is not the same instance').' than $this'." <br>\r\n"; call_user_func_array('f_test', $this->arg_array); } } $oTest = new clsTest; $oTest->meth(); // OK $oTest->meth(); // ERR ?>

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.2.10.0000.00818.07
8.2.00.0040.00418.11
8.1.140.0030.00517.49
8.1.130.0060.00319.48
8.1.120.0040.00417.49
8.1.110.0000.00817.48
8.1.100.0000.00817.50
8.1.90.0000.00717.42
8.1.80.0000.00717.41
8.1.70.0000.00717.36
8.1.60.0030.00617.53
8.1.50.0030.00517.51
8.1.40.0040.00417.39
8.1.30.0000.00817.65
8.1.20.0040.00417.66
8.1.10.0040.00417.45
8.1.00.0040.00417.40
8.0.260.0000.00717.30
8.0.250.0000.00716.96
8.0.240.0080.00016.93
8.0.230.0080.00017.01
8.0.220.0040.00416.93
8.0.210.0040.00416.85
8.0.200.0030.00516.95
8.0.190.0050.00316.92
8.0.180.0040.00416.82
8.0.170.0030.00616.98
8.0.160.0070.00016.89
8.0.150.0000.00716.88
8.0.140.0050.00216.73
8.0.130.0000.00613.26
8.0.120.0080.00016.77
8.0.110.0040.00416.82
8.0.100.0020.00516.77
8.0.90.0040.00416.96
8.0.80.0030.01116.80
8.0.70.0000.00716.73
8.0.60.0030.00516.78
8.0.50.0040.00416.72
8.0.30.0090.00717.04
8.0.20.0120.01017.40
8.0.10.0040.00417.07
8.0.00.0120.00516.78
7.4.330.0020.00215.08
7.4.320.0060.00016.38
7.4.300.0030.00316.58
7.4.290.0000.00716.56
7.4.280.0040.00416.52
7.4.270.0000.00716.51
7.4.260.0000.00816.45
7.4.250.0070.00016.56
7.4.240.0080.00016.52
7.4.230.0000.00616.31
7.4.220.0150.01216.68
7.4.210.0090.00616.55
7.4.200.0000.00716.42
7.4.160.0090.00616.64
7.4.150.0130.01317.40
7.4.140.0080.01017.86
7.4.130.0100.00816.49
7.4.120.0110.00616.51
7.4.110.0080.01616.54
7.4.100.0120.00816.38
7.4.90.0110.00716.52
7.4.80.0120.00619.39
7.4.70.0090.01316.57
7.4.60.0200.00416.51
7.4.50.0050.00316.46
7.4.40.0070.01716.58
7.4.30.0070.01016.38
7.4.10.0120.00015.18
7.4.00.0060.01115.01
7.3.330.0000.00513.21
7.3.320.0000.00613.25
7.3.310.0050.00216.41
7.3.300.0030.00316.21
7.3.290.0060.00916.35
7.3.280.0070.00816.36
7.3.270.0130.00717.40
7.3.260.0100.00716.56
7.3.250.0090.00916.52
7.3.240.0030.01516.34
7.3.230.0060.00916.39
7.3.210.0000.01716.48
7.3.200.0060.01219.39
7.3.190.0110.00716.34
7.3.180.0040.01216.59
7.3.170.0100.00716.50
7.3.160.0090.00916.45
7.3.130.0040.00815.06
7.3.120.0090.00614.75
7.3.110.0090.00614.96
7.3.100.0030.01014.78
7.3.90.0030.01014.51
7.3.80.0060.00614.63
7.3.70.0060.00614.61
7.3.60.0080.00414.84
7.3.50.0060.00614.55
7.3.40.0070.00715.02
7.3.30.0080.00314.79
7.3.20.0060.00316.46
7.3.10.0040.01116.34
7.3.00.0040.00716.61
7.2.330.0190.00016.87
7.2.320.0120.01216.82
7.2.310.0080.00916.41
7.2.300.0000.01616.81
7.2.290.0140.01016.42
7.2.260.0040.01414.89
7.2.250.0060.01215.07
7.2.240.0100.00315.08
7.2.230.0040.01115.05
7.2.220.0030.00615.04
7.2.210.0060.00915.02
7.2.200.0080.00314.98
7.2.190.0040.00715.01
7.2.180.0070.00715.01
7.2.170.0070.00714.93
7.2.160.0030.00915.01
7.2.150.0000.00916.99
7.2.140.0090.00617.11
7.2.130.0070.00317.00
7.2.120.0070.00716.65
7.2.110.0110.00017.09
7.2.100.0030.01017.12
7.2.90.0030.00917.04
7.2.80.0000.00917.03
7.2.70.0030.01416.97
7.2.60.0050.01116.70
7.2.50.0100.00716.73
7.2.40.0050.00516.96
7.2.30.0090.00016.97
7.2.20.0070.00717.09
7.2.10.0000.01617.03
7.2.00.0060.00718.18
7.1.330.0090.00415.93
7.1.320.0030.00915.93
7.1.310.0060.00315.97
7.1.300.0070.00415.77
7.1.290.0070.00715.59
7.1.280.0060.00915.82
7.1.270.0040.00715.88
7.1.260.0060.00615.90
7.1.250.0070.00715.87
7.1.240.0040.00415.79
7.1.230.0030.00915.80
7.1.220.0040.00415.80
7.1.210.0070.00715.74
7.1.200.0060.00515.67
7.1.190.0070.00715.82
7.1.180.0000.01415.87
7.1.170.0090.00315.86
7.1.160.0030.01015.88
7.1.150.0090.00315.61
7.1.140.0050.00515.55
7.1.130.0030.01015.94
7.1.120.0060.00615.92
7.1.110.0000.01215.79
7.1.100.0020.01017.03
7.1.90.0030.00915.97
7.1.80.0000.01215.87
7.1.70.0070.00616.30
7.1.60.0050.01117.45
7.1.50.0070.01216.40
7.1.40.0090.00616.02
7.1.30.0060.01015.68
7.1.20.0040.01215.93
7.1.10.0060.00315.68
7.1.00.0060.04319.14
7.0.330.0100.00315.57
7.0.320.0070.00715.61
7.0.310.0030.00615.58
7.0.300.0000.01415.20
7.0.290.0030.01015.52
7.0.280.0060.00915.41
7.0.270.0030.01015.45
7.0.260.0000.00915.37
7.0.250.0070.00715.51
7.0.240.0000.00915.46
7.0.230.0040.00415.48
7.0.220.0100.00315.46
7.0.210.0100.00715.26
7.0.200.0050.00415.95
7.0.190.0000.01115.58
7.0.180.0060.01015.26
7.0.170.0000.01815.24
7.0.160.0060.00615.32
7.0.150.0090.00315.51
7.0.140.0000.01015.48
7.0.130.0060.00915.51
7.0.120.0040.00815.29
7.0.110.0030.00615.40
7.0.100.0070.00415.23
7.0.90.0030.01315.45
7.0.80.0100.00315.70
7.0.70.0020.03418.58
7.0.60.0030.04918.50
7.0.50.0060.03818.74
7.0.40.0020.04716.91
7.0.30.0030.03516.89
7.0.20.0030.03616.79
7.0.10.0050.04216.73
7.0.00.0080.04316.88
5.6.400.0060.00914.66
5.6.390.0060.00314.48
5.6.380.0030.01014.38
5.6.370.0030.00614.45
5.6.360.0000.00814.51
5.6.350.0090.00614.51
5.6.340.0030.00614.61
5.6.330.0030.00714.46
5.6.320.0070.01014.27
5.6.310.0060.00914.44
5.6.300.0090.00314.12
5.6.290.0070.00414.36
5.6.280.0030.04017.82
5.6.270.0030.00914.60
5.6.260.0120.00014.25
5.6.250.0080.00314.36
5.6.240.0000.01214.59
5.6.230.0030.01014.44
5.6.220.0080.04517.47
5.6.210.0050.04617.40
5.6.200.0070.04217.91
5.6.190.0020.04617.75
5.6.180.0060.03017.91
5.6.170.0080.03217.80
5.6.160.0050.04517.79
5.6.150.0050.04817.73
5.6.140.0050.03317.76
5.6.130.0060.03617.73
5.6.120.0040.04417.69
5.6.110.0070.04517.93
5.6.100.0070.04217.80
5.6.90.0050.04217.86
5.6.80.0070.03517.45
5.6.70.0050.02717.46
5.6.60.0030.04617.42
5.6.50.0070.04217.56
5.6.40.0040.04017.37
5.6.30.0030.04517.41
5.6.20.0030.04617.40
5.6.10.0070.03917.37
5.6.00.0070.04417.34
5.5.380.0040.01114.50
5.5.370.0080.00414.36
5.5.360.0030.04517.44
5.5.350.0060.04517.42
5.5.340.0050.04517.61
5.5.330.0050.04717.80
5.5.320.0050.04917.73
5.5.310.0030.04517.66
5.5.300.0060.03517.46
5.5.290.0070.04217.69
5.5.280.0110.02817.58
5.5.270.0040.04917.45
5.5.260.0070.04317.52
5.5.250.0030.04617.56
5.5.240.0030.04217.23
5.5.230.0060.03017.36
5.5.220.0060.04017.20
5.5.210.0070.04317.38
5.5.200.0080.04017.08
5.5.190.0100.04017.18
5.5.180.0050.04517.27
5.5.170.0090.00014.36
5.5.160.0030.02817.36
5.5.150.0030.04117.34
5.5.140.0030.04417.19
5.5.130.0110.03617.35
5.5.120.0060.04617.28
5.5.110.0020.04317.44
5.5.100.0120.03517.18
5.5.90.0070.04117.24
5.5.80.0040.04217.15
5.5.70.0020.04617.33
5.5.60.0060.04217.26
5.5.50.0020.04617.16
5.5.40.0080.02817.21
5.5.30.0060.04117.09
5.5.20.0040.04517.08
5.5.10.0030.04517.22
5.5.00.0050.03917.19
5.4.450.0100.07319.41
5.4.440.0000.07319.42
5.4.430.0030.05319.35
5.4.420.0000.08719.16
5.4.410.0070.06019.40
5.4.400.0030.07319.00
5.4.390.0070.04719.14
5.4.380.0100.07018.90
5.4.370.0100.07319.05
5.4.360.0070.08018.95
5.4.350.0070.07719.05
5.4.340.0070.05019.16
5.4.320.0100.05319.13
5.4.310.0030.06019.23
5.4.300.0070.07019.04
5.4.290.0100.06719.21
5.4.280.0100.07319.04
5.4.270.0070.07319.09
5.4.260.0100.06719.13
5.4.250.0130.07019.23
5.4.240.0030.07719.18
5.4.230.0070.07319.04
5.4.220.0070.06719.04
5.4.210.0070.07019.20
5.4.200.0000.05018.84
5.4.190.0030.04719.04
5.4.180.0000.07719.13
5.4.170.0030.08318.89
5.4.160.0000.08019.11
5.4.150.0030.07319.10
5.4.140.0030.07016.46
5.4.130.0070.07016.45
5.4.120.0030.04316.39
5.4.110.0100.04016.33
5.4.100.0030.07016.45
5.4.90.0030.06316.45
5.4.80.0030.04716.53
5.4.70.0030.04316.51
5.4.60.0030.07016.37
5.4.50.0070.03716.36
5.4.40.0070.05716.32
5.4.30.0030.07316.45
5.4.20.0030.05316.37
5.4.10.0030.07316.47
5.4.00.0030.07015.88
5.3.290.0030.07714.79
5.3.280.0070.07014.73
5.3.270.0030.08314.73
5.3.260.0030.06314.62
5.3.250.0030.07714.53
5.3.240.0030.07014.67
5.3.230.0000.08314.54
5.3.220.0000.08014.64
5.3.210.0000.08014.58
5.3.200.0000.08314.69
5.3.190.0030.08014.59
5.3.180.0000.05714.53
5.3.170.0100.03314.63
5.3.160.0030.05714.55
5.3.150.0070.07314.70
5.3.140.0070.04014.54
5.3.130.0030.07014.50
5.3.120.0030.05714.60
5.3.110.0030.06014.52
5.3.100.0030.08014.11
5.3.90.0030.07714.07
5.3.80.0030.06714.11
5.3.70.0000.07714.02
5.3.60.0030.06013.93
5.3.50.0000.07313.88
5.3.40.0030.07313.94
5.3.30.0000.07714.02
5.3.20.0000.04313.68
5.3.10.0070.03313.56
5.3.00.0170.07013.78
5.2.170.0000.04312.34
5.2.160.0030.06312.34
5.2.150.0000.06712.34
5.2.140.0030.04012.34
5.2.130.0030.03312.34
5.2.120.0030.03012.34
5.2.110.0030.04712.34
5.2.100.0070.05712.34
5.2.90.0000.04012.34
5.2.80.0030.03012.34
5.2.70.0070.06312.34
5.2.60.0070.05012.34
5.2.50.0100.05712.34
5.2.40.0030.05712.34
5.2.30.0030.05712.34
5.2.20.0000.04712.34
5.2.10.0000.06312.34
5.2.00.0100.05312.34
5.1.60.0070.04712.34
5.1.50.0100.04712.34
5.1.40.0000.03312.34
5.1.30.0030.05312.34
5.1.20.0100.05012.34
5.1.10.0000.05712.34
5.1.00.0000.05312.34
5.0.50.0000.04712.34
5.0.40.0030.04312.34
5.0.30.0000.06712.34
5.0.20.0000.04312.34
5.0.10.0030.04312.34
5.0.00.0030.06712.34
4.4.90.0000.04012.34
4.4.80.0030.03312.34
4.4.70.0070.03312.34
4.4.60.0070.03012.34
4.4.50.0030.03312.34
4.4.40.0030.05312.34
4.4.30.0000.03012.34
4.4.20.0000.04012.34
4.4.10.0030.02312.34
4.4.00.0030.03712.34
4.3.110.0030.03312.34
4.3.100.0070.03012.34
4.3.90.0070.02012.34
4.3.80.0000.05712.34
4.3.70.0030.02712.34
4.3.60.0030.03312.34
4.3.50.0030.02312.34
4.3.40.0000.03712.34
4.3.30.0000.03712.34
4.3.20.0070.02712.34
4.3.10.0000.02012.34
4.3.00.0030.03312.34

preferences:
12.86 ms | 403 KiB | 5 Q