3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call(array &$class, string $member, ...$args) { if(!isset($class[$member])) exit($member.' is not a member of the class.'); else { if(!is_callable($class[$member])) return $class[$member]; else { if(!isset($args[0])) $class[$member]($class); } } } $myClass = [ 'foo' => 'Hello World', 'bar' => function (&$this) { $this['foo'] = '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.0100.01016.63
8.3.50.0080.00816.14
8.3.40.0120.00618.89
8.3.30.0000.01418.63
8.3.20.0040.00420.38
8.3.10.0040.00421.90
8.3.00.0080.00023.55
8.2.180.0040.01518.17
8.2.170.0070.00722.96
8.2.160.0070.01020.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00721.06
8.2.120.0000.00826.35
8.2.110.0030.00621.00
8.2.100.0110.00017.68
8.2.90.0040.00418.86
8.2.80.0070.00317.97
8.2.70.0000.00817.38
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0080.00022.12
8.2.30.0040.00419.24
8.2.20.0040.00417.59
8.2.10.0040.00417.93
8.2.00.0060.00317.92
8.1.280.0030.01125.92
8.1.270.0060.00324.04
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0060.00323.96
8.1.230.0040.00719.16
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.00917.10
8.1.190.0030.00517.00
8.1.180.0040.00418.10
8.1.170.0060.00318.60
8.1.160.0030.00620.68
8.1.150.0040.00418.71
8.1.140.0040.00419.32
8.1.130.0000.00717.49
8.1.120.0070.00017.36
8.1.110.0070.00017.23
8.1.100.0040.00417.23
8.1.90.0050.00317.32
8.1.80.0080.00017.23
8.1.70.0030.00317.34
8.1.60.0040.00417.45
8.1.50.0030.00517.45
8.1.40.0040.00417.41
8.1.30.0060.00317.56
8.1.20.0000.00817.54
8.1.10.0080.00017.41
8.1.00.0000.00717.32
8.0.300.0000.00718.77
8.0.290.0040.00416.58
8.0.280.0040.00218.27
8.0.270.0040.00417.05
8.0.260.0070.00017.00
8.0.250.0000.00716.91
8.0.240.0050.00216.77
8.0.230.0000.00716.82
8.0.220.0000.00716.82
8.0.210.0100.00016.78
8.0.200.0000.00616.89
8.0.190.0080.00016.79
8.0.180.0030.00316.91
8.0.170.0050.00316.87
8.0.160.0000.00716.86
8.0.150.0060.00316.60
8.0.140.0030.00516.74
8.0.130.0000.00513.21
8.0.120.0000.00816.69
8.0.110.0050.00316.83
8.0.100.0050.00316.63
8.0.90.0040.00416.83
8.0.80.0060.00916.88
8.0.70.0000.00716.86
8.0.60.0000.00716.70
8.0.50.0040.00416.74
8.0.30.0020.01717.05
8.0.20.0070.01217.40
8.0.10.0040.00416.80
8.0.00.0100.01116.65
7.4.330.0020.00216.77
7.4.320.0060.00016.46
7.4.300.0000.00716.29
7.4.290.0030.00316.52
7.4.280.0000.00716.28
7.4.270.0060.00016.37
7.4.260.0040.00416.28
7.4.250.0040.00416.47
7.4.240.0070.00016.52
7.4.230.0000.00816.17
7.4.220.0060.01016.45
7.4.210.0050.01016.48
7.4.200.0000.00716.36
7.4.160.0090.00616.30
7.4.150.0000.01817.40
7.4.140.0100.01017.86
7.4.130.0090.01016.36
7.4.120.0090.01116.32
7.4.110.0070.01116.36
7.4.100.0070.01616.49
7.4.90.0200.00316.34
7.4.80.0110.00719.39
7.4.70.0070.01116.34
7.4.60.0060.01016.46
7.4.50.0030.01316.53
7.4.40.0030.01516.39
7.4.30.0200.00316.41
7.4.00.0050.00514.73
7.3.330.0070.00013.07
7.3.320.0000.00513.11
7.3.310.0000.00716.23
7.3.300.0000.00716.24
7.3.290.0030.00316.10
7.3.280.0110.00916.23
7.3.270.0090.00917.40
7.3.260.0130.01016.43
7.3.250.0070.01116.28
7.3.240.0090.00816.43
7.3.230.0120.00916.39
7.3.210.0110.00616.24
7.3.200.0030.01219.39
7.3.190.0130.00316.33
7.3.180.0070.01116.39
7.3.170.0150.00316.34
7.3.160.0180.00916.30
7.3.120.0040.00714.86
7.3.110.0040.00714.71
7.3.100.0110.00014.88
7.3.90.0040.00814.95
7.3.80.0040.00714.91
7.3.70.0000.01114.41
7.3.60.0070.00414.66
7.3.50.0070.00414.59
7.3.40.0000.01114.55
7.3.30.0000.01114.70
7.3.20.0080.00416.45
7.3.10.0060.00716.39
7.3.00.0060.00616.44
7.2.330.0120.00616.63
7.2.320.0030.01416.55
7.2.310.0060.01016.25
7.2.300.0090.00916.37
7.2.290.0060.01016.49
7.2.250.0040.00815.04
7.2.240.0000.01214.68
7.2.230.0080.00414.79
7.2.220.0080.00414.71
7.2.210.0080.00414.66
7.2.200.0040.00814.85
7.2.190.0000.01114.81
7.2.180.0100.00314.99
7.2.170.0040.00814.78
7.2.130.0000.01416.70
7.2.120.0050.00516.82
7.2.110.0140.00616.56
7.2.100.0100.00716.48
7.2.90.0140.00416.09
7.2.80.0030.01016.72
7.2.70.0110.00316.58
7.2.60.0030.00816.50
7.2.50.0100.00316.90
7.2.40.0040.00716.80
7.2.30.0080.00416.95
7.2.20.0040.00816.36
7.2.10.0070.00316.66
7.2.00.0030.00817.89
7.1.330.0040.00715.75
7.1.320.0040.00715.70
7.1.310.0030.00715.73
7.1.300.0070.00315.72
7.1.290.0070.00415.62
7.1.280.0070.00415.57
7.1.270.0030.00715.72
7.1.260.0110.00015.46
7.1.250.0090.00315.64
7.1.200.0040.00715.54
7.1.100.0040.00818.00
7.1.70.0040.01217.03
7.1.60.0090.01519.28
7.1.50.0090.01216.81
7.1.00.0070.07322.57
7.0.200.0000.01016.27
7.0.60.0030.03021.75
7.0.50.0030.08017.89
7.0.40.0070.04320.18
7.0.30.0330.06320.23
7.0.20.0230.06020.26
7.0.10.0070.07320.15
7.0.00.0130.06720.19
5.6.280.0030.04321.09
5.6.210.0100.06720.68
5.6.200.0070.07718.12
5.6.190.0200.03720.62
5.6.180.0200.04020.70
5.6.170.0270.03020.55
5.6.160.0200.06720.57
5.6.150.0170.08318.15
5.6.140.0100.08018.19
5.6.130.0170.07718.11
5.6.120.0030.05020.91
5.6.110.0030.05720.96
5.6.100.0030.08721.05
5.6.90.0130.05320.97
5.6.80.0130.07720.39
5.5.350.4070.04320.38
5.5.340.0130.07717.98
5.5.330.0100.04320.08
5.5.320.0570.04720.24
5.5.310.0200.05020.35
5.5.300.0130.04718.04
5.5.290.0030.08317.98
5.5.280.0070.08020.81
5.5.270.0030.04020.77
5.5.260.0030.04320.76
5.5.250.0070.08720.70
5.5.240.0270.06720.27

preferences:
45.83 ms | 400 KiB | 5 Q