3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call(array &$class, string $member, ...$args) { if(!isset($args[1])) { if(!isset($class[$member])) exit($member.' is not a member of the class.'); else { if(!is_callable($class[$member])) return $class[$member]; else { $class[$member]($class); } } } else { } } $myClass = [ 'foo' => 'Hello World', 'bar' => function (&$this) { $this['bar'] = 'Hi!'; } ]; echo(call($myClass, 'foo')); call($myClass, 'bar'); echo(call($myClass, 'foo'));

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.00316.75
8.3.50.0140.00720.98
8.3.40.0120.00318.79
8.3.30.0120.00318.53
8.3.20.0040.00420.18
8.3.10.0040.00421.81
8.3.00.0070.00023.50
8.2.180.0100.01018.41
8.2.170.0110.00322.96
8.2.160.0130.00320.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.07
8.2.120.0000.00726.35
8.2.110.0100.00021.04
8.2.100.0040.00717.80
8.2.90.0000.00918.92
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0040.00717.80
8.2.50.0000.00818.07
8.2.40.0000.00822.13
8.2.30.0000.00719.32
8.2.20.0000.00717.60
8.2.10.0040.00417.93
8.2.00.0060.00317.86
8.1.280.0070.00725.92
8.1.270.0130.00622.17
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0040.00423.88
8.1.230.0100.00019.21
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0080.00017.23
8.1.190.0090.00017.10
8.1.180.0080.00018.10
8.1.170.0050.00318.55
8.1.160.0080.00320.56
8.1.150.0040.00418.75
8.1.140.0000.00819.37
8.1.130.0070.00017.49
8.1.120.0040.00417.27
8.1.110.0040.00417.31
8.1.100.0000.00817.22
8.1.90.0000.00817.21
8.1.80.0000.00717.33
8.1.70.0000.00717.32
8.1.60.0000.00817.36
8.1.50.0080.00017.32
8.1.40.0000.00817.42
8.1.30.0030.00517.43
8.1.20.0040.00417.48
8.1.10.0040.00417.27
8.1.00.0000.00817.34
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00818.26
8.0.270.0070.00017.10
8.0.260.0030.00317.14
8.0.250.0030.00316.92
8.0.240.0030.00316.81
8.0.230.0000.00816.97
8.0.220.0030.00316.82
8.0.210.0000.00816.86
8.0.200.0060.00016.86
8.0.190.0000.00816.94
8.0.180.0000.00716.89
8.0.170.0050.00316.77
8.0.160.0040.00316.70
8.0.150.0090.00016.83
8.0.140.0070.00016.67
8.0.130.0030.00313.23
8.0.120.0030.00516.79
8.0.110.0040.00416.74
8.0.100.0030.00516.85
8.0.90.0040.00416.79
8.0.80.0030.01216.83
8.0.70.0000.00816.69
8.0.60.0070.00016.83
8.0.50.0040.00416.82
8.0.30.0100.00616.81
8.0.20.0090.01117.40
8.0.10.0040.00416.91
8.0.00.0110.00816.58
7.4.330.0000.00516.84
7.4.320.0000.00716.44
7.4.300.0000.00816.48
7.4.290.0000.00716.32
7.4.280.0040.00416.36
7.4.270.0000.00716.38
7.4.260.0030.00316.34
7.4.250.0040.00416.41
7.4.240.0000.00716.39
7.4.230.0000.00716.22
7.4.220.0040.01216.54
7.4.210.0110.00616.43
7.4.200.0040.00416.45
7.4.160.0060.00916.65
7.4.150.0030.01417.40
7.4.140.0080.01117.86
7.4.130.0080.01016.33
7.4.120.0130.00716.43
7.4.110.0060.01216.41
7.4.100.0160.00716.46
7.4.90.0070.01116.52
7.4.80.0100.01019.39
7.4.70.0000.01616.60
7.4.60.0040.01316.23
7.4.50.0030.01316.52
7.4.40.0150.00016.36
7.4.30.0000.01716.48
7.4.00.0080.00914.74
7.3.330.0050.00213.22
7.3.320.0060.00013.08
7.3.310.0000.00716.08
7.3.300.0030.00316.14
7.3.290.0030.00316.13
7.3.280.0110.00616.27
7.3.270.0090.00917.40
7.3.260.0090.00916.23
7.3.250.0080.01016.19
7.3.240.0050.01116.23
7.3.230.0150.00316.39
7.3.210.0090.01216.07
7.3.200.0000.01619.39
7.3.190.0060.01016.23
7.3.180.0110.00616.31
7.3.170.0060.01216.33
7.3.160.0170.00616.16
7.3.120.0120.00014.69
7.3.110.0040.00814.62
7.3.100.0130.00614.49
7.3.90.0100.00914.50
7.3.80.0120.00314.75
7.3.70.0000.01214.54
7.3.60.0080.00414.84
7.3.50.0160.00014.61
7.3.40.0040.01214.64
7.3.30.0030.01014.70
7.3.20.0060.01216.73
7.3.10.0070.00716.59
7.3.00.0060.01016.40
7.2.330.0100.00616.40
7.2.320.0090.00916.54
7.2.310.0070.01416.34
7.2.300.0040.01316.30
7.2.290.0110.01116.35
7.2.250.0040.01114.70
7.2.240.0070.01114.71
7.2.230.0040.01514.80
7.2.220.0070.01114.91
7.2.210.0030.01014.78
7.2.200.0030.01014.70
7.2.190.0090.00314.64
7.2.180.0070.00714.70
7.2.170.0040.00814.87
7.2.110.0120.00016.50
7.2.100.0030.01016.44
7.2.90.0040.01116.38
7.2.80.0060.00316.54
7.2.70.0060.00816.76
7.2.60.0100.00516.81
7.2.50.0060.00616.68
7.2.40.0090.00016.60
7.2.30.0030.01016.71
7.2.20.0030.01316.67
7.2.10.0090.00616.76
7.2.00.0050.00818.04
7.1.330.0090.00415.56
7.1.320.0040.01415.51
7.1.310.0090.00415.34
7.1.300.0030.01015.33
7.1.290.0000.01315.53
7.1.280.0040.00715.25
7.1.270.0180.00015.43
7.1.260.0080.00615.66
7.1.230.0140.00015.48
7.1.220.0090.00615.60
7.1.210.0070.00715.60
7.1.200.0060.00615.59
7.1.190.0060.00615.68
7.1.180.0100.00315.59
7.1.170.0100.00315.54
7.1.160.0060.00615.56
7.1.150.0100.00315.57
7.1.140.0090.00615.64
7.1.130.0120.00315.63
7.1.120.0070.00715.23
7.1.110.0090.00315.61
7.1.100.0040.00616.75
7.1.90.0030.00615.45
7.1.80.0090.00615.59
7.1.70.0050.00816.20
7.1.60.0060.01317.54
7.1.50.0070.01216.21
7.1.40.0110.00815.46
7.1.30.0090.00615.79
7.1.20.0120.00615.86
7.1.10.0100.00015.28
7.1.00.0080.03818.90
7.0.310.0090.00615.29
7.0.300.0040.00715.17
7.0.290.0070.00715.05
7.0.280.0040.00815.20
7.0.270.0070.00315.18
7.0.260.0070.00315.26
7.0.250.0030.00915.02
7.0.240.0000.01115.08
7.0.230.0040.00815.46
7.0.220.0080.00415.11
7.0.210.0000.01515.47
7.0.200.0020.01015.87
7.0.190.0030.00615.18
7.0.180.0070.00315.27
7.0.170.0040.00815.25
7.0.160.0060.00615.24
7.0.150.0070.00415.28
7.0.140.0000.01115.27
7.0.130.0100.00015.26
7.0.120.0080.00514.98
7.0.110.0070.00715.40
7.0.100.0030.00815.11
7.0.90.0030.01015.17
7.0.80.0100.00315.15
7.0.70.0040.00415.45
7.0.60.0030.02418.67
7.0.50.0090.04016.68
7.0.40.0070.03316.83
7.0.30.0160.04116.78
7.0.20.0150.04016.82
7.0.10.0070.05016.89
7.0.00.0070.04016.77
5.6.380.0040.00414.44
5.6.370.0090.00614.52
5.6.360.0090.00314.16
5.6.350.0030.00914.31
5.6.340.0030.01314.51
5.6.330.0070.01014.44
5.6.320.0030.01014.40
5.6.310.0030.01214.23
5.6.300.0060.00314.27
5.6.290.0030.00914.34
5.6.280.0020.03717.62
5.6.270.0110.00413.92
5.6.260.0030.00914.36
5.6.250.0120.00314.53
5.6.240.0060.00614.33
5.6.230.0120.00314.21
5.6.220.0110.00014.20
5.6.210.0130.04017.36
5.6.200.0160.03716.21
5.6.190.0050.02517.42
5.6.180.0170.04217.49
5.6.170.0130.02817.42
5.6.160.0120.03817.33
5.6.150.0070.02316.27
5.6.140.0050.04416.22
5.6.130.0030.03016.15
5.6.120.0030.02617.56
5.6.110.0080.03317.52
5.6.100.0090.03017.65
5.6.90.0100.04217.59
5.6.80.0080.04017.24
5.6.70.0070.00313.92
5.6.60.0000.01414.07
5.6.50.0040.01114.25
5.6.40.0060.01014.15
5.6.30.0100.00314.27
5.6.20.0050.00514.39
5.6.10.0000.00814.26
5.6.00.0070.00714.08
5.5.380.0060.00612.79
5.5.370.0000.00812.79
5.5.360.0000.00812.79
5.5.350.1850.02416.55
5.5.340.0080.03215.40
5.5.330.0050.03516.60
5.5.320.0270.03016.50
5.5.310.0120.02716.55
5.5.300.0060.03815.40
5.5.290.0040.02815.42
5.5.280.0100.04216.83
5.5.270.0030.02416.71
5.5.260.0060.02116.71
5.5.250.0090.02016.68
5.5.240.0110.04316.42
5.5.230.0040.00812.79
5.5.220.0060.00012.79
5.5.210.0000.01012.79
5.5.200.0060.00312.79
5.5.190.0040.00712.79
5.5.180.0060.00612.79
5.5.170.0030.01314.04
5.5.160.0100.00012.79
5.5.150.0050.00012.79
5.5.140.0040.00412.79
5.5.130.0060.00312.79
5.5.120.0000.00812.79
5.5.110.0080.00312.79
5.5.100.0000.01012.79
5.5.90.0030.00712.79
5.5.80.0030.00712.79
5.5.70.0040.00412.79
5.5.60.0000.01112.79
5.5.50.0000.01012.79
5.5.40.0030.01012.79
5.5.30.0000.00612.79
5.5.20.0000.01112.79
5.5.10.0000.01112.79
5.5.00.0040.00712.79

preferences:
62.37 ms | 401 KiB | 5 Q