3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { private $p = 'secret'; function RetVal(){ return $this->p; } } class y { private $q = 'queen'; function RetValue() { return $this->q; } } $f = function() { return (new x)->RetVal(); }; echo $f(),"\n"; $g = function(){ return $this->p; }; $nu = $g->bindto((new x), "x"); echo $nu(),"\n"; echo $g->call((new x)); $g = function(){ return $this->q; }; echo "\n",$g->call((new y)); echo is_callable($g)? 'yes' : 'no';

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.0040.01116.50
8.3.50.0070.00718.05
8.3.40.0140.00018.52
8.3.30.0140.00418.65
8.3.20.0050.00320.25
8.3.10.0040.00423.66
8.3.00.0080.00019.26
8.2.180.0100.00718.31
8.2.170.0100.01022.96
8.2.160.0030.01222.11
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0030.00619.36
8.2.120.0040.00426.35
8.2.110.0000.01119.27
8.2.100.0040.00817.72
8.2.90.0040.00417.75
8.2.80.0000.00918.83
8.2.70.0050.00317.50
8.2.60.0080.00017.63
8.2.50.0000.00917.55
8.2.40.0060.00319.35
8.2.30.0000.00820.71
8.2.20.0000.00917.72
8.2.10.0070.00018.08
8.2.00.0080.00018.14
8.1.280.0040.01125.92
8.1.270.0000.00922.23
8.1.260.0000.00728.09
8.1.250.0080.00028.09
8.1.240.0000.00922.03
8.1.230.0060.00620.97
8.1.220.0030.00518.58
8.1.210.0000.00818.77
8.1.200.0050.00317.35
8.1.190.0040.00417.23
8.1.180.0060.00318.10
8.1.170.0040.00419.03
8.1.160.0040.00422.03
8.1.150.0030.00618.96
8.1.140.0030.00519.52
8.1.130.0030.00317.73
8.1.120.0060.00317.43
8.1.110.0000.00717.47
8.1.100.0040.00417.45
8.1.90.0030.00517.31
8.1.80.0000.00817.55
8.1.70.0000.00717.38
8.1.60.0000.00817.63
8.1.50.0040.00417.57
8.1.40.0040.00417.58
8.1.30.0030.00517.66
8.1.20.0080.00017.67
8.1.10.0000.00717.67
8.1.00.0060.00317.55
8.0.300.0070.00020.02
8.0.290.0000.00716.75
8.0.280.0000.00718.43
8.0.270.0040.00417.28
8.0.260.0080.00017.29
8.0.250.0040.00416.88
8.0.240.0060.00316.88
8.0.230.0050.00316.87
8.0.220.0000.00716.74
8.0.210.0000.00816.73
8.0.200.0020.00516.99
8.0.190.0080.00316.86
8.0.180.0040.00416.98
8.0.170.0080.00016.93
8.0.160.0030.00516.79
8.0.150.0040.00416.99
8.0.140.0030.00816.79
8.0.130.0030.00313.30
8.0.120.0000.00816.89
8.0.110.0000.00716.80
8.0.100.0000.00716.88
8.0.90.0040.00416.79
8.0.80.0100.01016.89
8.0.70.0080.00016.91
8.0.60.0000.00716.90
8.0.50.0060.00316.71
8.0.30.0130.00417.11
8.0.20.0130.00717.40
8.0.10.0040.00417.03
8.0.00.0090.01016.85
7.4.330.0000.00516.83
7.4.320.0040.00416.63
7.4.300.0050.00216.63
7.4.290.0070.00016.55
7.4.280.0040.00416.54
7.4.270.0000.00616.61
7.4.260.0000.00716.38
7.4.250.0030.00516.55
7.4.240.0030.00316.58
7.4.230.0070.00016.70
7.4.220.0080.01116.50
7.4.210.0050.01416.73
7.4.200.0040.00416.60
7.4.160.0120.01216.58
7.4.150.0060.01217.40
7.4.140.0110.00817.86
7.4.130.0110.00616.46
7.4.120.0110.00616.41
7.4.110.0130.01016.59
7.4.100.0060.01216.49
7.4.90.0080.00816.41
7.4.80.0070.01019.39
7.4.70.0090.00916.54
7.4.60.0120.00616.50
7.4.50.0100.00716.55
7.4.40.0060.01216.62
7.4.30.0110.01116.30
7.4.10.0000.01516.77
7.4.00.0050.00815.51
7.3.330.0000.00613.26
7.3.320.0030.00313.29
7.3.310.0030.00416.26
7.3.300.0000.00716.28
7.3.290.0080.00816.26
7.3.280.0110.00716.28
7.3.270.0060.01017.40
7.3.260.0090.01316.30
7.3.250.0080.00816.22
7.3.240.0150.00816.32
7.3.230.0110.00616.39
7.3.210.0030.02016.16
7.3.200.0090.00916.33
7.3.190.0080.00816.27
7.3.180.0090.01316.45
7.3.170.0090.01216.31
7.3.160.0060.01016.44
7.3.130.0040.00716.26
7.3.120.0110.00815.62
7.3.110.0100.00815.54
7.3.100.0100.00815.43
7.3.90.0020.01215.59
7.3.80.0020.01415.32
7.3.70.0050.00515.52
7.3.60.0030.01015.55
7.3.50.0080.00615.49
7.3.40.0050.00715.44
7.3.30.0110.00315.50
7.3.20.0050.00817.44
7.3.10.0030.00717.36
7.3.00.0050.00517.16
7.2.330.0120.01616.88
7.2.320.0090.00816.59
7.2.310.0000.01716.48
7.2.300.0120.00616.65
7.2.290.0110.00616.43
7.2.260.0070.01116.64
7.2.250.0100.00715.65
7.2.240.0070.01015.93
7.2.230.0070.00815.67
7.2.220.0060.00915.91
7.2.210.0070.00815.89
7.2.200.0030.00815.68
7.2.190.0040.00816.00
7.2.180.0080.00315.84
7.2.170.0030.01115.94
7.2.160.0090.00615.88
7.2.150.0040.00517.71
7.2.140.0050.01017.65
7.2.130.0050.01117.51
7.2.120.0080.00617.69
7.2.110.0040.00917.49
7.2.100.0050.01117.54
7.2.90.0080.00817.63
7.2.80.0080.00617.70
7.2.70.0070.00717.63
7.2.60.0070.00717.47
7.2.50.0080.00517.77
7.2.40.0050.01017.60
7.2.30.0050.01017.78
7.2.20.0030.01317.55
7.2.10.0100.00517.57
7.2.00.0060.00818.31
7.1.330.0030.01016.55
7.1.320.0090.00916.51
7.1.310.0060.00716.49
7.1.300.0040.00916.29
7.1.290.0030.00816.54
7.1.280.0060.00516.40
7.1.270.0030.00816.51
7.1.260.0070.00716.53
7.1.250.0050.00816.53
7.1.240.0050.00916.60
7.1.230.0060.00516.63
7.1.220.0050.00816.48
7.1.210.0070.00716.51
7.1.200.0040.00716.14
7.1.190.0060.00616.45
7.1.180.0020.00916.56
7.1.170.0050.00816.52
7.1.160.0040.01016.65
7.1.150.0030.01016.49
7.1.140.0050.00716.51
7.1.130.0030.00916.52
7.1.120.0100.00216.43
7.1.110.0000.01216.53
7.1.100.0050.00617.15
7.1.90.0030.01016.43
7.1.80.0050.01016.56
7.1.70.0060.00416.70
7.1.60.0060.01117.58
7.1.50.0030.01116.64
7.1.40.0060.00616.42
7.1.30.0080.00216.39
7.1.20.0120.00216.48
7.1.10.0050.01116.58
7.1.00.0060.02918.39
7.0.330.0070.00516.22
7.0.320.0050.00816.26
7.0.310.0080.00516.06
7.0.300.0060.00716.21
7.0.290.0090.00416.22
7.0.280.0080.00516.21
7.0.270.0010.01016.13
7.0.260.0060.00816.05
7.0.250.0070.00716.22
7.0.240.0090.00616.15
7.0.230.0050.01016.11
7.0.220.0050.00516.28
7.0.210.0030.00716.09
7.0.200.0130.00415.62
7.0.190.0030.01016.19
7.0.180.0020.00816.29
7.0.170.0060.00416.25
7.0.160.0050.00816.13
7.0.150.0070.00616.11
7.0.140.0060.00516.16
7.0.130.0030.00816.35
7.0.120.0070.00516.09
7.0.110.0050.00916.27
7.0.100.0040.00716.24
7.0.90.0020.00816.26
7.0.80.0050.00816.13
7.0.70.0100.00316.23
7.0.60.0070.03017.49
7.0.50.0080.02616.79
7.0.40.0050.02216.20
7.0.30.0110.01816.16
7.0.20.0110.01716.17
7.0.10.0070.03016.15
7.0.00.0040.02016.16
5.6.400.0050.00515.12
5.6.390.0030.01215.08
5.6.380.0050.00815.20
5.6.370.0050.00614.98
5.6.360.0040.00715.10
5.6.350.0020.01415.07
5.6.340.0040.00714.98
5.6.330.0030.00614.93
5.6.320.0050.01215.06
5.6.310.0030.01015.12
5.6.300.0000.00914.88
5.6.290.0050.01015.12
5.6.280.0070.02017.23
5.6.270.0040.00915.10
5.6.260.0100.00415.32
5.6.250.0040.00715.23
5.6.240.0040.01015.02
5.6.230.0070.00715.06
5.6.220.0030.00915.11
5.6.210.0050.02517.07
5.6.200.0050.03316.13
5.6.190.0080.02716.99
5.6.180.0170.02616.92
5.6.170.0140.01917.03
5.6.160.0080.03016.88
5.6.150.0040.03416.08
5.6.140.0040.02116.01
5.6.130.0070.02616.02
5.6.120.0050.03117.13
5.6.110.0090.02217.07
5.6.100.0060.03416.98
5.6.90.0060.02217.08
5.6.80.0050.01716.73
5.6.70.0070.00514.91
5.6.60.0020.00915.11
5.6.50.0050.00615.05
5.6.40.0080.00915.04
5.6.30.0000.00815.04
5.6.20.0020.01215.18
5.6.10.0080.00514.98
5.6.00.0020.00715.11
5.5.380.0040.00615.11
5.5.370.0060.01015.09
5.5.360.0060.00715.24
5.5.350.1210.02216.79
5.5.340.0060.02915.97
5.5.330.0060.02516.76
5.5.320.0110.03516.71
5.5.310.0140.03016.72
5.5.300.0060.02115.98
5.5.290.0070.02315.93
5.5.280.0050.03216.92
5.5.270.0050.03317.07
5.5.260.0040.03516.90
5.5.250.0030.03416.89
5.5.240.0140.02416.61
5.5.230.0040.00514.84
5.5.220.0030.00815.07
5.5.210.0050.01015.05
5.5.200.0040.00415.11
5.5.190.0070.00714.88
5.5.180.0060.01114.70
5.5.170.0090.00615.14
5.5.160.0070.00714.99
5.5.150.0040.00714.98
5.5.140.0080.00514.74
5.5.130.0070.00515.03
5.5.120.0110.00314.92
5.5.110.0070.00914.87
5.5.100.0030.00915.15
5.5.90.0070.00814.87
5.5.80.0090.00515.13
5.5.70.0080.00614.76
5.5.60.0080.00515.15
5.5.50.0060.00515.06
5.5.40.0040.00814.98
5.5.30.0070.01014.95
5.5.20.0090.00214.78
5.5.10.0040.00915.00
5.5.00.0070.00715.07

preferences:
56.88 ms | 401 KiB | 5 Q