3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { const name = 'awk'; public $name = 'awk'; function test() { echo __FUNCTION__ . '\n'; } } class Test { function test1(B $a, $b) { var_dump($a, $b); } } $method = 'test1'; $class = new ReflectionClass('Test'); $test1 = $class->getMethod($method); $args = $test1->getParameters(); $args_arr = []; foreach ($args as $arg) { $reflection_class = $arg->getClass(); if ($reflection_class) { $arg = $reflection_class->newInstance(); } $args_arr[] = $arg; } call_user_func_array([new Test(), $method], $args_arr); //var_dump($args_arr);

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.0140.00718.55
8.3.50.0070.00716.40
8.3.40.0090.00618.96
8.3.30.0040.01118.84
8.3.20.0040.00420.29
8.3.10.0080.00023.43
8.3.00.0030.00619.79
8.2.180.0070.01116.88
8.2.170.0090.00622.96
8.2.160.0100.00319.07
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00019.20
8.2.120.0070.00026.35
8.2.110.0100.00021.04
8.2.100.0050.00518.26
8.2.90.0090.00019.48
8.2.80.0080.00017.97
8.2.70.0060.00317.93
8.2.60.0030.00618.34
8.2.50.0000.00818.16
8.2.40.0000.00820.59
8.2.30.0000.00719.28
8.2.20.0040.00418.24
8.2.10.0080.00018.11
8.2.00.0000.00718.05
8.1.280.0040.01125.92
8.1.270.0040.00422.10
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0080.00022.14
8.1.230.0110.00020.91
8.1.220.0050.00317.80
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0000.00719.02
8.1.150.0040.00418.90
8.1.140.0070.00419.46
8.1.130.0000.00719.02
8.1.120.0000.00717.39
8.1.110.0050.00317.40
8.1.100.0030.00717.46
8.1.90.0040.00417.41
8.1.80.0000.00817.53
8.1.70.0000.00717.48
8.1.60.0000.00717.58
8.1.50.0000.00817.48
8.1.40.0040.00717.56
8.1.30.0000.00817.73
8.1.20.0000.00817.57
8.1.10.0000.00817.57
8.1.00.0040.00417.52
8.0.300.0070.00019.71
8.0.290.0030.00616.75
8.0.280.0000.00718.42
8.0.270.0030.00317.20
8.0.260.0060.00018.37
8.0.250.0000.00716.91
8.0.240.0040.00417.04
8.0.230.0000.00716.93
8.0.220.0000.00716.87
8.0.210.0050.00216.86
8.0.200.0040.00417.03
8.0.190.0080.00017.04
8.0.180.0040.00416.96
8.0.170.0000.01117.03
8.0.160.0000.00716.95
8.0.150.0070.00016.93
8.0.140.0040.00416.94
8.0.130.0000.00613.40
8.0.120.0040.00416.77
8.0.110.0040.00416.84
8.0.100.0040.00416.99
8.0.90.0000.00716.88
8.0.80.0040.01116.96
8.0.70.0040.00416.92
8.0.60.0030.00516.82
8.0.50.0040.00416.91
8.0.30.0070.01317.10
8.0.20.0090.01317.40
8.0.10.0080.00017.05
8.0.00.0130.01016.63
7.4.330.0050.00015.55
7.4.320.0030.00316.57
7.4.300.0060.00016.45
7.4.290.0030.00616.61
7.4.280.0030.00516.46
7.4.270.0070.00016.53
7.4.260.0000.01016.47
7.4.250.0040.00416.63
7.4.240.0040.00416.38
7.4.230.0050.00216.63
7.4.220.0030.02616.71
7.4.210.0100.01116.69
7.4.200.0000.00716.45
7.4.160.0140.00316.63
7.4.150.0040.01317.40
7.4.140.0110.00717.86
7.4.130.0130.00716.64
7.4.120.0180.00316.55
7.4.110.0060.01216.46
7.4.100.0090.01016.36
7.4.90.0090.00916.42
7.4.80.0070.01019.39
7.4.70.0040.01316.35
7.4.60.0140.00616.47
7.4.50.0030.01116.50
7.4.40.0040.01216.48
7.4.30.0100.00616.68
7.4.10.0090.00915.14
7.4.00.0070.01015.13
7.3.330.0000.00513.39
7.3.320.0000.00513.31
7.3.310.0070.00016.32
7.3.300.0030.00316.28
7.3.290.0050.00916.28
7.3.280.0090.00916.29
7.3.270.0130.01017.40
7.3.260.0120.00616.31
7.3.250.0090.00816.34
7.3.240.0110.00616.58
7.3.230.0110.00916.19
7.3.210.0170.00016.59
7.3.200.0090.01216.46
7.3.190.0130.00316.38
7.3.180.0100.00616.52
7.3.170.0100.00616.55
7.3.160.0080.01216.50
7.3.130.0090.00915.18
7.3.120.0090.00914.85
7.3.110.0030.01514.88
7.3.100.0030.01014.96
7.3.90.0100.00714.99
7.3.80.0070.00414.97
7.3.70.0030.00614.79
7.3.60.0000.01314.67
7.3.50.0120.00314.81
7.3.40.0050.00814.59
7.3.30.0120.00514.55
7.3.20.0130.00416.57
7.3.10.0080.00816.58
7.3.00.0100.00716.47
7.2.330.0050.01116.57
7.2.320.0090.00916.90
7.2.310.0060.01016.54
7.2.300.0120.00416.77
7.2.290.0090.00616.54
7.2.260.0030.01715.16
7.2.250.0090.01014.98
7.2.240.0130.00314.80
7.2.230.0050.00715.13
7.2.220.0060.00915.13
7.2.210.0080.00815.18
7.2.200.0080.00715.19
7.2.190.0070.01115.05
7.2.180.0080.00515.10
7.2.170.0030.00915.11
7.2.160.0080.00615.05
7.2.150.0060.00317.03
7.2.140.0030.00916.95
7.2.130.0100.01017.05
7.2.120.0060.01316.99
7.2.110.0090.00917.06
7.2.100.0100.00717.05
7.2.90.0000.01517.08
7.2.80.0080.00816.94
7.2.70.0090.00617.13
7.2.60.0060.00516.96
7.2.50.0030.01317.11
7.2.40.0080.00817.02
7.2.30.0170.00017.05
7.2.20.0110.00417.00
7.2.10.0030.01316.76
7.2.00.0040.01118.02
7.1.330.0090.00415.76
7.1.320.0080.00515.95
7.1.310.0030.00915.80
7.1.300.0050.01015.78
7.1.290.0050.00815.54
7.1.280.0090.00315.93
7.1.270.0060.00715.72
7.1.260.0040.01015.96
7.1.250.0040.01115.60
7.1.240.0060.00815.82
7.1.230.0000.01515.85
7.1.220.0070.01015.79
7.1.210.0100.00415.95
7.1.200.0060.00615.70
7.1.190.0000.01315.46
7.1.180.0110.00315.88
7.1.170.0060.00915.68
7.1.160.0080.00415.86
7.1.150.0000.01715.81
7.1.140.0030.00715.70
7.1.130.0090.00615.96
7.1.120.0100.00315.80
7.1.110.0000.01315.98
7.1.100.0160.00716.92
7.1.90.0000.01115.98
7.1.80.0060.00315.94
7.1.70.0070.00916.28
7.1.60.0180.01325.43
7.1.50.0220.00925.36
7.1.40.0180.01425.13
7.1.30.0200.01225.17
7.1.20.0160.00825.14
7.1.10.0050.01216.28
7.1.00.0090.00916.28
7.0.330.0140.00415.33
7.0.320.0090.00615.46
7.0.310.0080.00315.63
7.0.300.0070.01015.20
7.0.290.0060.00615.14
7.0.280.0060.00615.46
7.0.270.0070.00715.26
7.0.260.0000.01215.50
7.0.250.0030.00815.30
7.0.240.0030.00915.37
7.0.230.0030.01015.48
7.0.220.0040.01115.59
7.0.210.0040.00415.59
7.0.200.0100.00816.14
7.0.190.0100.00816.08
7.0.180.0100.00815.82
7.0.170.0120.01015.81
7.0.160.0100.00715.89
7.0.150.0110.00615.90
7.0.140.0090.01115.82
7.0.130.0100.01216.08
7.0.120.0080.00915.96
7.0.110.0050.01015.79
7.0.100.0070.01015.70
7.0.90.0030.01315.92
7.0.80.0050.01115.87
7.0.70.0120.00515.96
7.0.60.0080.00615.71
7.0.50.0140.00515.92
7.0.40.0060.01014.94
7.0.30.0070.01115.01
7.0.20.0090.00614.95
7.0.10.0130.00515.03
7.0.00.0040.01314.75
5.6.400.0100.00714.65
5.6.390.0110.00714.39
5.6.380.0100.00314.69
5.6.370.0030.01014.77
5.6.360.0030.01214.33
5.6.350.0070.00714.71
5.6.340.0000.01414.68
5.6.330.0030.00914.30
5.6.320.0060.00614.29
5.6.310.0100.00714.39
5.6.300.0000.01514.52
5.6.290.0090.00314.38
5.6.280.0040.00814.64
5.6.270.0070.00714.36
5.6.260.0060.00614.49
5.6.250.0120.00314.73
5.6.240.0060.00914.51
5.6.230.0040.00814.30
5.6.220.0000.01514.59
5.6.210.0030.01014.28
5.6.200.0030.01314.37
5.6.190.0000.01614.31
5.6.180.0040.01114.69
5.6.170.0030.01014.64
5.6.160.0040.01114.56
5.6.150.0070.00714.48
5.6.140.0030.01414.28
5.6.130.0040.01114.48
5.6.120.0040.01214.57
5.6.110.0000.01614.25
5.6.100.0000.01014.46
5.6.90.0070.00714.20
5.6.80.0040.00714.24
5.6.70.0110.00414.14
5.6.60.0030.01014.54
5.6.50.0000.00814.45
5.6.40.0120.00314.38
5.6.30.0060.00314.29
5.6.20.0040.01114.10
5.6.10.0120.00314.43
5.6.00.0080.00414.25

preferences:
48.28 ms | 401 KiB | 5 Q