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, 0); $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.0090.00616.63
8.3.50.0120.00721.11
8.3.40.0090.00618.97
8.3.30.0110.00418.68
8.3.20.0040.00420.29
8.3.10.0080.00021.76
8.3.00.0040.00419.68
8.2.180.0190.00316.63
8.2.170.0070.00722.96
8.2.160.0140.00020.94
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0060.00317.75
8.2.110.0070.00322.38
8.2.100.0000.01117.75
8.2.90.0070.00019.21
8.2.80.0040.00417.97
8.2.70.0000.01017.63
8.2.60.0040.00417.77
8.2.50.0020.01018.07
8.2.40.0080.00021.16
8.2.30.0040.00417.96
8.2.20.0080.00017.77
8.2.10.0040.00418.16
8.2.00.0000.00717.93
8.1.280.0120.00325.92
8.1.270.0130.00620.38
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0070.00319.20
8.1.230.0090.00317.50
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.13
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0060.00318.60
8.1.160.0040.00422.05
8.1.150.0000.00718.82
8.1.140.0080.00017.38
8.1.130.0030.00317.63
8.1.120.0000.00717.47
8.1.110.0070.00017.49
8.1.100.0040.00417.40
8.1.90.0000.00817.52
8.1.80.0030.00517.36
8.1.70.0000.00817.29
8.1.60.0050.00317.50
8.1.50.0060.00317.63
8.1.40.0050.00317.43
8.1.30.0080.00017.72
8.1.20.0000.00817.71
8.1.10.0040.00417.51
8.1.00.0050.00217.52
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.28
8.0.270.0000.00717.26
8.0.260.0000.01017.21
8.0.250.0040.00416.95
8.0.240.0030.00316.95
8.0.230.0030.00316.89
8.0.220.0030.00316.91
8.0.210.0070.00016.89
8.0.200.0040.00417.10
8.0.190.0060.00317.02
8.0.180.0040.00416.89
8.0.170.0040.00416.91
8.0.160.0030.00316.98
8.0.150.0080.00416.66
8.0.140.0000.00716.93
8.0.130.0030.00313.36
8.0.120.0000.00816.93
8.0.110.0000.00816.95
8.0.100.0040.00417.00
8.0.90.0000.00716.82
8.0.80.0090.00616.98
8.0.70.0050.00316.81
8.0.60.0070.00017.09
8.0.50.0070.00016.87
8.0.30.0070.01217.11
8.0.20.0070.01417.40
8.0.10.0040.00417.02
8.0.00.0070.01116.83
7.4.330.0020.00215.08
7.4.320.0000.00616.52
7.4.300.0000.00616.63
7.4.290.0020.00516.54
7.4.280.0030.00616.50
7.4.270.0040.00416.45
7.4.260.0070.00016.60
7.4.250.0040.00416.63
7.4.240.0020.00516.56
7.4.230.0030.00316.36
7.4.220.0090.00916.73
7.4.210.0110.00616.59
7.4.200.0000.00716.32
7.4.160.0060.00916.46
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0100.00716.58
7.4.120.0110.00916.63
7.4.110.0120.00616.66
7.4.100.0060.01216.75
7.4.90.0070.01016.50
7.4.80.0140.00619.39
7.4.70.0110.00616.41
7.4.60.0030.01416.57
7.4.50.0040.00416.75
7.4.40.0060.01216.64
7.4.30.0090.01016.73
7.4.00.0100.00815.16
7.3.330.0050.00013.25
7.3.320.0050.00013.19
7.3.310.0070.00016.20
7.3.300.0000.00716.34
7.3.290.0000.00616.33
7.3.280.0090.00716.31
7.3.270.0160.00017.40
7.3.260.0070.01016.52
7.3.250.0100.00716.35
7.3.240.0060.01316.42
7.3.230.0080.00816.39
7.3.210.0080.00916.38
7.3.200.0120.00916.55
7.3.190.0100.00716.42
7.3.180.0030.01316.34
7.3.170.0160.00016.36
7.3.160.0090.01216.47
7.3.120.0030.01314.93
7.3.110.0040.00714.84
7.3.100.0030.01414.86
7.3.90.0080.00814.70
7.3.80.0030.01014.80
7.3.70.0070.00414.85
7.3.60.0110.00414.85
7.3.50.0040.00814.69
7.3.40.0030.01414.92
7.3.30.0070.00414.77
7.3.20.0070.00716.71
7.3.10.0030.01016.64
7.3.00.0100.00316.57
7.2.330.0100.00716.70
7.2.320.0040.01516.88
7.2.310.0070.01016.83
7.2.300.0060.01116.76
7.2.290.0130.01016.42
7.2.250.0070.01114.73
7.2.240.0000.01915.21
7.2.230.0070.00715.29
7.2.220.0000.00914.85
7.2.210.0030.01015.00
7.2.200.0030.01015.11
7.2.190.0070.00714.81
7.2.180.0060.00614.87
7.2.170.0070.00414.87
7.2.60.0160.00316.75
7.2.00.0080.00319.28
7.1.330.0000.01215.84
7.1.320.0030.00915.84
7.1.310.0030.01415.96
7.1.300.0040.01215.83
7.1.290.0070.01015.76
7.1.280.0040.01215.97
7.1.270.0100.00615.86
7.1.260.0100.00315.81
7.1.200.0080.00815.71
7.1.100.0050.00518.15
7.1.70.0040.00417.20
7.1.60.0100.01420.03
7.1.50.0060.01017.05
7.1.00.0100.07022.43
7.0.200.0270.00714.70
7.0.60.0000.08719.91
7.0.50.0000.04317.89
7.0.40.0100.07720.05
7.0.30.0330.07720.23
7.0.20.0230.08720.09
7.0.10.0230.03320.08
7.0.00.0030.04020.07
5.6.280.0030.06720.99
5.6.210.0000.05020.77
5.6.200.0200.07018.16
5.6.190.0030.04320.49
5.6.180.0070.08020.28
5.6.170.0170.05320.44
5.6.160.0070.08720.50
5.6.150.0070.06018.14
5.6.140.0030.06018.19
5.6.130.0100.03718.19
5.6.120.0130.07321.04
5.6.110.0100.08021.14
5.6.100.0100.08020.97
5.6.90.0000.04321.00
5.6.80.0000.08020.51
5.6.70.4530.04020.42
5.5.350.0070.06720.35
5.5.340.0070.08018.02
5.5.330.0070.04020.32
5.5.320.0330.04020.36
5.5.310.0300.05320.41
5.5.300.0030.08717.97
5.5.290.0000.08718.06
5.5.280.0070.08720.96
5.5.270.0170.07320.77
5.5.260.0200.08020.89
5.5.250.0100.07320.57
5.5.240.0070.08320.26
5.4.450.0230.06719.55
5.4.440.0270.07019.46
5.4.430.0200.04319.45
5.4.420.0230.05019.54
5.4.410.0200.05019.25
5.4.400.0270.06719.25
5.4.390.0400.07019.18
5.4.380.0170.07319.16
5.4.370.0270.04318.98
5.4.360.0300.06719.16
5.4.350.0200.07319.08
5.4.340.0330.04319.05
5.4.320.0430.05719.22
5.4.310.0230.07719.15
5.4.300.0230.07019.24
5.4.290.0270.04319.13
5.4.280.0200.04719.31
5.4.270.0230.04719.16
5.4.260.0300.06719.13
5.4.250.0370.05718.84
5.4.240.0230.07019.16
5.4.230.0200.08318.94
5.4.220.0300.05319.21
5.4.210.0170.04318.98
5.4.200.0270.03018.86
5.4.190.0270.05718.93
5.4.180.0200.07319.21
5.4.170.0200.04719.25
5.4.160.0300.05718.97
5.4.150.0300.07018.92
5.4.140.0330.06316.45
5.4.130.0370.05716.33
5.4.120.0270.04316.30
5.4.110.0230.06316.33
5.4.100.0330.04316.57
5.4.90.0300.06316.56
5.4.80.0200.06716.54

preferences:
57.64 ms | 401 KiB | 5 Q