3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Wl\A; class B { public function get() { return "BBBBB"; } } $b = new B(); $funct = function (B $b) { print_r($b::get()); }; $refParam = new \ReflectionParameter($funct, 1); $export = \ReflectionParameter::export( array( $refParam->getDeclaringClass()->name, $refParam->getDeclaringFunction()->name ), $refParam->name, true ); $type = preg_replace('/.*?(\w+)\s+\$'.$refParam->name.'.*/', '\\1', $export); echo "ARGS:\n"; echo $type; exit; try { $a->b(""); } catch (\Exception $e) { echo "catched"; } catch (\TypeError $e) { echo "subidubi"; }

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.0120.00616.73
8.3.50.0050.01321.20
8.3.40.0070.01018.67
8.3.30.0040.01118.65
8.3.20.0040.00420.16
8.3.10.0040.00421.91
8.3.00.0040.00419.55
8.2.180.0080.00816.75
8.2.170.0060.00922.96
8.2.160.0110.00320.56
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0000.01126.16
8.2.120.0060.00317.63
8.2.110.0040.00422.19
8.2.100.0030.00917.75
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0050.00317.93
8.2.50.0050.00518.07
8.2.40.0030.00521.25
8.2.30.0050.00218.13
8.2.20.0040.00417.81
8.2.10.0040.00418.20
8.2.00.0040.00418.14
8.1.280.0100.01025.92
8.1.270.0100.00720.33
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0030.00622.42
8.1.230.0090.00317.42
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.47
8.1.190.0000.00817.00
8.1.180.0030.00518.10
8.1.170.0040.00418.71
8.1.160.0050.00222.07
8.1.150.0030.00518.99
8.1.140.0050.00217.38
8.1.130.0030.00317.77
8.1.120.0000.00717.48
8.1.110.0000.00817.46
8.1.100.0040.00417.45
8.1.90.0040.00417.52
8.1.80.0040.00417.48
8.1.70.0040.00417.39
8.1.60.0040.00417.42
8.1.50.0080.00017.52
8.1.40.0050.00317.54
8.1.30.0000.00817.63
8.1.20.0040.00417.58
8.1.10.0040.00417.52
8.1.00.0030.00617.52
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.32
8.0.270.0040.00417.21
8.0.260.0060.00317.16
8.0.250.0050.00316.96
8.0.240.0070.00016.84
8.0.230.0050.00316.88
8.0.220.0000.00916.90
8.0.210.0000.00716.95
8.0.200.0060.00017.01
8.0.190.0070.00417.03
8.0.180.0040.00417.00
8.0.170.0040.00417.04
8.0.160.0030.00416.89
8.0.150.0000.01116.95
8.0.140.0030.00416.97
8.0.130.0050.00013.39
8.0.120.0050.00316.89
8.0.110.0000.00716.98
8.0.100.0040.00417.03
8.0.90.0040.00416.95
8.0.80.0090.00617.04
8.0.70.0000.00816.98
8.0.60.0000.00716.85
8.0.50.0000.00716.97
8.0.30.0120.00817.01
8.0.20.0060.01317.40
8.0.10.0040.00417.13
8.0.00.0080.01116.77
7.4.330.0000.00515.08
7.4.320.0000.00616.60
7.4.300.0000.00616.51
7.4.290.0030.00516.58
7.4.280.0020.00516.42
7.4.270.0060.00016.42
7.4.260.0000.00716.37
7.4.250.0030.00316.59
7.4.240.0020.00516.54
7.4.230.0000.00716.68
7.4.220.0130.00616.54
7.4.210.0030.01116.55
7.4.200.0070.00016.70
7.4.160.0140.00716.45
7.4.150.0100.00717.40
7.4.140.0130.01017.86
7.4.130.0100.00816.54
7.4.120.0150.00416.59
7.4.110.0150.00416.47
7.4.100.0060.01016.57
7.4.90.0120.00616.71
7.4.80.0090.00919.39
7.4.70.0140.00316.52
7.4.60.0080.00916.48
7.4.50.0040.00416.43
7.4.40.0090.00916.64
7.4.30.0110.00616.67
7.4.00.0050.00915.08
7.3.330.0050.00013.31
7.3.320.0000.00513.32
7.3.310.0000.00816.21
7.3.300.0060.00016.34
7.3.290.0030.00316.28
7.3.280.0110.00716.28
7.3.270.0070.01017.40
7.3.260.0090.00816.53
7.3.250.0120.00616.37
7.3.240.0070.01016.61
7.3.230.0110.01116.43
7.3.210.0070.01016.34
7.3.200.0150.00516.36
7.3.190.0110.00616.46
7.3.180.0060.00916.34
7.3.170.0060.01016.46
7.3.160.0080.00816.33
7.3.120.0090.00614.90
7.3.110.0150.00314.99
7.3.100.0100.01014.87
7.3.90.0090.00614.95
7.3.80.0040.01214.86
7.3.70.0080.00814.79
7.3.60.0040.01214.90
7.3.50.0000.01214.90
7.3.40.0040.00714.90
7.3.30.0040.00714.62
7.3.20.0120.00616.38
7.3.10.0060.00916.36
7.3.00.0090.00916.71
7.2.330.0030.01416.48
7.2.320.0120.00816.71
7.2.310.0130.00316.82
7.2.300.0120.00916.69
7.2.290.0030.01916.49
7.2.250.0070.01315.22
7.2.240.0040.01514.87
7.2.230.0060.01214.92
7.2.220.0040.01114.81
7.2.210.0040.01415.25
7.2.200.0100.00715.14
7.2.190.0100.00315.04
7.2.180.0030.00715.09
7.2.170.0080.00415.18
7.2.80.0100.00316.69
7.2.60.0110.01716.27
7.2.00.0000.01319.43
7.1.330.0110.00715.73
7.1.320.0120.00415.89
7.1.310.0070.00415.77
7.1.300.0120.00015.79
7.1.290.0040.00815.86
7.1.280.0100.00315.81
7.1.270.0110.00715.64
7.1.260.0000.01615.80
7.1.200.0060.00315.84
7.1.100.0110.00018.10
7.1.70.0000.00917.16
7.1.60.0110.01120.03
7.1.50.0030.02016.85
7.1.00.0070.07322.32
7.0.200.0210.00414.70
7.0.60.0070.05319.88
7.0.50.0070.08017.89
7.0.40.0030.04720.09
7.0.30.0330.07320.25
7.0.20.0200.05320.09
7.0.10.0070.04020.06
7.0.00.0070.07320.22
5.6.280.0100.07321.03
5.6.210.0130.05020.53
5.6.200.0070.06718.19
5.6.190.0030.04720.55
5.6.180.4230.04020.55
5.6.170.0170.05720.55
5.6.160.0000.04320.57
5.6.150.0070.04018.12
5.6.140.0030.07318.21
5.6.130.0030.04018.27
5.6.120.0130.06321.00
5.6.110.0100.08321.11
5.6.100.0170.07320.97
5.6.90.0200.06721.08
5.6.80.0100.05720.48
5.5.350.0170.07720.50
5.5.340.0030.04717.98
5.5.330.0200.03320.28
5.5.320.3400.02320.27
5.5.310.0230.07720.25
5.5.300.0070.04318.08
5.5.290.0130.04717.95
5.5.280.0200.07320.81
5.5.270.0200.04020.65
5.5.260.0070.04320.98
5.5.250.0170.06320.79
5.5.240.3930.04320.36
5.4.450.0430.05719.55
5.4.440.0400.06019.61
5.4.430.0530.06019.58
5.4.420.0430.05719.55
5.4.410.0470.06019.48
5.4.400.0500.05719.29
5.4.390.0470.06319.29
5.4.380.0470.05719.20
5.4.370.0470.04719.15
5.4.360.0570.05019.27
5.4.350.0500.05719.29
5.4.340.0500.05719.26
5.4.320.0430.05019.29
5.4.310.0470.05019.28
5.4.300.0800.04719.22
5.4.290.0570.05019.16
5.4.280.0530.05718.87
5.4.270.0600.04319.15
5.4.260.0530.05319.22
5.4.250.0600.05019.14
5.4.240.0530.05718.87
5.4.230.0570.05319.05
5.4.220.0630.04319.22
5.4.210.0530.05718.86
5.4.200.0530.05318.86
5.4.190.0670.04019.13
5.4.180.0670.04319.36
5.4.170.0500.04719.36
5.4.160.0400.06319.12
5.4.150.0500.05719.13
5.4.140.0530.05016.39
5.4.130.0530.05016.50
5.4.120.0400.05016.46
5.4.110.0370.05316.61
5.4.100.0400.04716.29
5.4.90.0470.04016.28
5.4.80.0330.05316.39
5.4.70.0000.04716.56
5.4.60.0270.03716.43
5.4.50.0000.07716.37
5.4.40.0270.07016.54
5.4.30.0330.04316.52
5.4.20.0400.05716.48

preferences:
44.1 ms | 401 KiB | 5 Q