3v4l.org

run code in 300+ PHP versions simultaneously
<?php class salutations { public function hello() { return "Hello World!"; } } class methodFactory { public function __construct($instance) { $this->package = $instance; } public function getPackageMethod($method) { if (method_exists($this->package, $method)) { $f = function($method) { return $this->$method; }; Closure::bindTo($f, $this->package); return $f; } } } $salutationsInstance = new salutations(); $obj = new methodFactory($salutationsInstance); $hello = $obj->getPackageMethod('hello'); $hello();

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.40.0070.01418.82
8.3.30.0070.01118.89
8.3.20.0060.00320.30
8.3.10.0030.00623.52
8.3.00.0070.00018.05
8.2.170.0030.01022.96
8.2.160.0100.00320.21
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0050.00226.16
8.2.120.0000.00817.88
8.2.110.0060.00322.06
8.2.100.0100.00317.93
8.2.90.0050.00319.08
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0110.00017.93
8.2.50.0000.00818.07
8.2.40.0040.00421.07
8.2.30.0000.00820.64
8.2.20.0050.00217.62
8.2.10.0080.00019.88
8.2.00.0000.00717.94
8.1.270.0040.00423.91
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0000.00919.09
8.1.230.0080.00317.66
8.1.220.0000.00917.79
8.1.210.0050.00318.77
8.1.200.0000.00817.35
8.1.190.0060.00317.25
8.1.180.0000.00718.10
8.1.170.0040.00420.46
8.1.160.0000.00822.03
8.1.150.0000.00718.89
8.1.140.0000.00921.28
8.1.130.0030.00317.75
8.1.120.0000.00717.47
8.1.110.0080.00017.38
8.1.100.0040.00417.48
8.1.90.0050.00217.38
8.1.80.0080.00017.42
8.1.70.0030.00317.51
8.1.60.0000.00717.47
8.1.50.0090.00017.50
8.1.40.0000.00817.43
8.1.30.0080.00017.63
8.1.20.0080.00017.67
8.1.10.0050.00317.62
8.1.00.0040.00417.42
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0040.00417.12
8.0.260.0000.00617.22
8.0.250.0040.00416.93
8.0.240.0040.00416.96
8.0.230.0000.00716.87
8.0.220.0070.00016.86
8.0.210.0000.00716.88
8.0.200.0000.00717.03
8.0.190.0040.00417.07
8.0.180.0030.00316.99
8.0.170.0080.00016.88
8.0.160.0050.00316.95
8.0.150.0040.00416.95
8.0.140.0050.00316.93
8.0.130.0060.00013.47
8.0.120.0050.00316.82
8.0.110.0000.00716.87
8.0.100.0050.00216.93
8.0.90.0070.00017.00
8.0.80.0110.00816.96
8.0.70.0040.00417.00
8.0.60.0050.00316.75
8.0.50.0040.00416.83
8.0.30.0090.01117.20
8.0.20.0130.00417.40
8.0.10.0000.00717.21
8.0.00.0100.00716.67
7.4.330.0000.00515.08
7.4.320.0020.00516.41
7.4.300.0040.00416.45
7.4.290.0070.00016.59
7.4.280.0030.00616.47
7.4.270.0030.00316.46
7.4.260.0070.00016.49
7.4.250.0040.00416.53
7.4.240.0050.00216.55
7.4.230.0080.00016.59
7.4.220.0060.01216.59
7.4.210.0170.00316.46
7.4.200.0030.00416.63
7.4.160.0080.01116.50
7.4.150.0090.00917.40
7.4.140.0100.01217.86
7.4.130.0040.01516.43
7.4.120.0100.01116.55
7.4.110.0130.00316.54
7.4.100.0000.01616.57
7.4.90.0060.01016.55
7.4.80.0150.00319.39
7.4.70.0090.00916.67
7.4.60.0030.01416.54
7.4.50.0000.00816.55
7.4.40.0070.01016.45
7.4.30.0030.01316.70
7.4.10.0070.01115.03
7.4.00.0050.01314.92
7.3.330.0050.00013.29
7.3.320.0000.00613.11
7.3.310.0000.00616.36
7.3.300.0040.00416.20
7.3.290.0060.01216.33
7.3.280.0070.00916.36
7.3.270.0130.00617.40
7.3.260.0080.00916.41
7.3.240.0110.01016.43
7.3.230.0150.00316.45
7.3.210.0060.01216.58
7.3.200.0190.00316.45
7.3.190.0090.00616.43
7.3.180.0070.01016.41
7.3.170.0090.01216.45
7.3.160.0160.00616.44
7.3.130.0080.00414.89
7.3.120.0000.01814.98
7.3.110.0130.00615.06
7.3.100.0080.00314.99
7.3.90.0070.01114.89
7.3.80.0040.00714.91
7.3.70.0030.01014.91
7.3.60.0110.00614.79
7.3.50.0080.00414.56
7.3.40.0060.00714.90
7.3.30.0110.00414.61
7.3.20.0040.00816.61
7.3.10.0070.00716.64
7.3.00.0030.01016.78
7.2.330.0060.01016.56
7.2.320.0130.00616.73
7.2.310.0140.00316.55
7.2.300.0090.01216.70
7.2.290.0080.00816.73
7.2.260.0100.00615.21
7.2.250.0060.01314.79
7.2.240.0000.01315.20
7.2.230.0070.00715.14
7.2.220.0090.00914.96
7.2.210.0060.00914.93
7.2.200.0080.00414.94
7.2.190.0080.00814.82
7.2.180.0070.00714.98
7.2.170.0030.01014.88
7.2.160.0000.01114.98
7.2.150.0040.01216.83
7.2.140.0070.00716.78
7.2.130.0030.01216.87
7.2.120.0000.00917.00
7.2.110.0000.00916.99
7.2.100.0000.01016.93
7.2.90.0060.00617.02
7.2.80.0030.01016.98
7.2.70.0040.01116.94
7.2.60.0050.00616.91
7.2.50.0030.00817.00
7.2.40.0040.01117.01
7.2.30.0060.00617.03
7.2.20.0070.01116.91
7.2.10.0030.00916.96
7.2.00.0030.00618.27
7.1.330.0080.00815.73
7.1.320.0040.00415.89
7.1.310.0040.00715.85
7.1.300.0030.00515.81
7.1.290.0040.00415.80
7.1.280.0050.00815.62
7.1.270.0100.00315.65
7.1.260.0070.01015.91
7.1.250.0080.00416.01
7.1.240.0030.00715.79
7.1.230.0040.01115.71
7.1.220.0100.00715.73
7.1.210.0000.01515.88
7.1.200.0020.01115.75
7.1.190.0040.01115.86
7.1.180.0000.00915.55
7.1.170.0090.00315.49
7.1.160.0030.01015.56
7.1.150.0150.00015.91
7.1.140.0060.00615.55
7.1.130.0090.00615.82
7.1.120.0130.00015.82
7.1.110.0080.00815.69
7.1.100.0060.00717.08
7.1.90.0000.01315.85
7.1.80.0000.00915.61
7.1.70.0060.00916.55
7.1.60.0070.01217.60
7.1.50.0060.00916.36
7.1.40.0000.01515.91
7.1.30.0000.01215.63
7.1.20.0000.01415.79
7.1.10.0000.01115.77
7.1.00.0110.03218.90
7.0.330.0040.01115.43
7.0.320.0120.00315.19
7.0.310.0030.00715.38
7.0.300.0110.00315.15
7.0.290.0060.01215.51
7.0.280.0100.00315.18
7.0.270.0090.00315.50
7.0.260.0100.00315.41
7.0.250.0000.01115.45
7.0.240.0080.00415.50
7.0.230.0050.00315.61
7.0.220.0000.01115.63
7.0.210.0070.00715.48
7.0.200.0030.00716.17
7.0.190.0030.00815.23
7.0.180.0030.00615.48
7.0.170.0030.00915.36
7.0.160.0030.00715.34
7.0.150.0040.00815.55
7.0.140.0040.00715.24
7.0.130.0060.00615.49
7.0.120.0040.00815.41
7.0.110.0080.00415.51
7.0.100.0080.00315.29
7.0.90.0030.01015.49
7.0.80.0040.00415.57
7.0.70.0060.00915.42
7.0.60.0050.04417.76
7.0.50.0080.03716.79
7.0.40.0050.04816.86
7.0.30.0120.02716.96
7.0.20.0030.03216.74
7.0.10.0080.04316.84
7.0.00.0070.03916.87
5.6.400.0140.00014.22
5.6.390.0000.01214.22
5.6.380.0000.00914.23
5.6.370.0110.00014.38
5.6.360.0070.01014.06
5.6.350.0000.00914.59
5.6.340.0100.00614.68
5.6.330.0040.00714.59
5.6.320.0090.00614.44
5.6.310.0090.00614.39
5.6.300.0030.01014.20
5.6.290.0030.00514.20
5.6.280.0080.03517.77
5.6.270.0040.00814.54
5.6.260.0070.00714.22
5.6.250.0070.00714.13
5.6.240.0050.00314.38
5.6.230.0070.01014.46
5.6.220.0000.00914.20
5.6.210.0110.03117.47
5.6.200.0050.03216.27
5.6.190.0050.02317.38
5.6.180.0250.03617.58
5.6.170.0190.03417.49
5.6.160.0060.04817.39
5.6.150.0090.02316.10
5.6.140.0070.02716.26
5.6.130.0030.02916.27
5.6.120.0030.04117.63
5.6.110.0060.03817.77
5.6.100.0040.04617.81
5.6.90.0080.03317.68
5.6.80.0060.03117.48
5.6.70.0030.01014.18
5.6.60.0070.00714.57
5.6.50.0000.00814.30
5.6.40.0030.01214.37
5.6.30.0030.01014.38
5.6.20.0030.01214.19
5.6.10.0030.00514.13
5.6.00.0030.01014.19
5.5.380.0060.00314.05
5.5.370.0030.00714.61
5.5.360.0070.01014.35
5.5.350.0020.02717.37
5.5.340.0080.03816.12
5.5.330.0070.04417.31
5.5.320.2020.02217.47
5.5.310.0130.04117.39
5.5.300.0180.01516.13
5.5.290.0040.02216.26
5.5.280.0030.05217.46
5.5.270.0080.03017.55
5.5.260.0030.02517.66
5.5.250.0070.04017.48
5.5.240.0060.03617.29
5.5.230.0080.00814.30
5.5.220.0070.00714.13
5.5.210.0000.00914.38
5.5.200.0110.00314.17
5.5.190.0100.00713.90
5.5.180.0070.00714.36
5.5.170.0000.01514.36
5.5.160.0100.00614.23
5.5.150.0100.00614.07
5.5.140.0000.00814.09
5.5.130.0100.00314.39
5.5.120.0070.00714.27
5.5.110.0100.00314.51
5.5.100.0000.01014.18
5.5.90.0060.00614.20
5.5.80.0080.00314.13
5.5.70.0100.00314.30
5.5.60.0000.01114.13
5.5.50.0060.00614.03
5.5.40.0040.00714.31
5.5.30.0030.01014.41
5.5.20.0090.00614.11
5.5.10.0090.00614.24
5.5.00.0100.00714.22
5.4.450.0400.02715.12
5.4.440.0470.02815.42
5.4.430.0280.03315.30
5.4.420.0280.03515.33
5.4.410.0390.03015.18
5.4.400.0420.03515.24
5.4.390.0370.02815.04
5.4.380.0350.02814.86
5.4.370.0370.03015.00
5.4.360.0340.02914.95
5.4.350.0360.03615.05
5.4.340.0360.02515.03
5.4.330.0000.01011.13
5.4.320.0410.02814.96
5.4.310.0380.03015.04
5.4.300.0330.03514.82
5.4.290.0350.02815.16
5.4.280.0400.03114.86
5.4.270.0350.02815.10
5.4.260.0370.02915.22
5.4.250.0280.03015.07
5.4.240.0280.03215.13
5.4.230.0370.03114.88
5.4.220.0380.03015.17
5.4.210.0380.02815.22
5.4.200.0380.02915.10
5.4.190.0300.03014.95
5.4.180.0370.03415.04
5.4.170.0380.02815.24
5.4.160.0430.02514.83
5.4.150.0350.02915.11
5.4.140.0290.02913.76
5.4.130.0370.02513.67
5.4.120.0380.02713.75
5.4.110.0330.03113.71
5.4.100.0270.02913.78
5.4.90.0310.03113.88
5.4.80.0330.02913.74
5.4.70.0310.03113.48
5.4.60.0360.02613.73
5.4.50.0330.02513.81
5.4.40.0230.03313.69
5.4.30.0320.03213.57
5.4.20.0320.03013.73
5.4.10.0350.03113.66
5.4.00.0270.02613.50

preferences:
67.75 ms | 400 KiB | 5 Q