3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { public function sayHi () { echo "hi"; } } class Caller { private $_controller, $_action; public function __construct ($cont, $action) { $this->_controller = $cont; $this->_action = $action; } public function __toString() { return (string)$this->_action; } public function run () { $controller = new $this->_controller; if (is_callable(array($controller, $this->_action))) { $controller->$this->_action; } } } $caller = new Caller ('Example', 'sayHi'); $caller->run();

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.80
8.3.50.0110.01121.33
8.3.40.0120.00618.63
8.3.30.0030.01020.18
8.3.20.0040.00420.16
8.3.10.0040.00421.92
8.3.00.0000.00822.39
8.2.180.0110.01117.00
8.2.170.0150.00622.96
8.2.160.0100.00722.17
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0040.00420.80
8.2.110.0030.00622.29
8.2.100.0080.00417.78
8.2.90.0040.00419.35
8.2.80.0050.00319.36
8.2.70.0030.00517.50
8.2.60.0060.00517.90
8.2.50.0060.00318.07
8.2.40.0000.01217.94
8.2.30.0040.00419.34
8.2.20.0060.00317.83
8.2.10.0080.00017.63
8.2.00.0000.00817.76
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.91
8.1.230.0110.00019.10
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0070.00317.35
8.1.190.0000.00817.52
8.1.180.0040.00419.14
8.1.170.0000.01018.64
8.1.160.0040.00418.86
8.1.150.0000.00718.52
8.1.140.0000.00717.50
8.1.130.0000.00717.88
8.1.120.0000.00817.43
8.1.110.0040.00417.35
8.1.100.0040.00417.45
8.1.90.0040.00417.38
8.1.80.0000.00817.36
8.1.70.0000.00717.43
8.1.60.0000.00717.57
8.1.50.0030.00517.45
8.1.40.0060.00317.41
8.1.30.0080.00017.53
8.1.20.0000.00817.65
8.1.10.0000.00717.53
8.1.00.0030.00917.48
8.0.300.0000.00818.77
8.0.290.0070.00017.18
8.0.280.0050.00318.46
8.0.270.0070.00017.26
8.0.260.0000.00716.77
8.0.250.0050.00217.06
8.0.240.0080.00317.09
8.0.230.0030.00316.97
8.0.220.0030.00316.90
8.0.210.0050.00316.89
8.0.200.0030.00317.01
8.0.190.0030.00616.91
8.0.180.0070.00016.89
8.0.170.0000.00716.99
8.0.160.0080.00016.98
8.0.150.0080.00016.96
8.0.140.0000.00716.92
8.0.130.0030.00313.39
8.0.120.0070.00016.98
8.0.110.0050.00316.81
8.0.100.0080.00016.95
8.0.90.0040.00416.85
8.0.80.0120.00616.87
8.0.70.0070.00016.82
8.0.60.0040.00417.03
8.0.50.0050.00216.83
8.0.30.0090.01117.21
8.0.20.0120.00817.40
8.0.10.0000.00716.93
8.0.00.0090.00916.62
7.4.330.0000.00516.71
7.4.320.0030.00516.43
7.4.300.0000.00616.63
7.4.290.0030.00316.51
7.4.280.0000.00716.44
7.4.270.0000.00716.66
7.4.260.0030.00313.19
7.4.250.0040.00416.38
7.4.240.0020.00516.56
7.4.230.0000.00716.64
7.4.220.0080.01116.65
7.4.210.0080.00916.53
7.4.200.0070.00016.38
7.4.190.0020.00516.72
7.4.160.0070.01016.52
7.4.150.0140.00317.40
7.4.140.0100.00617.86
7.4.130.0090.00816.69
7.4.120.0090.00916.62
7.4.110.0120.00616.63
7.4.100.0150.00916.59
7.4.90.0000.01616.60
7.4.80.0060.01119.39
7.4.70.0070.01016.55
7.4.60.0140.00416.57
7.4.50.0030.00616.59
7.4.40.0060.00922.77
7.4.30.0040.01216.51
7.4.00.0110.00615.07
7.3.330.0050.00013.38
7.3.320.0020.00213.37
7.3.310.0040.00416.43
7.3.300.0030.00316.44
7.3.290.0100.01016.44
7.3.280.0080.01016.37
7.3.270.0060.01017.40
7.3.260.0120.00916.45
7.3.250.0130.00516.47
7.3.240.0070.01016.51
7.3.230.0030.01316.53
7.3.210.0110.00416.55
7.3.200.0060.00919.39
7.3.190.0070.01316.51
7.3.180.0100.00616.40
7.3.170.0140.00716.53
7.3.160.0130.00416.61
7.3.120.0060.01114.91
7.3.110.0050.01214.88
7.3.100.0030.01314.81
7.3.90.0050.00915.04
7.3.80.0090.00714.79
7.3.70.0050.01114.82
7.3.60.0070.00814.78
7.3.50.0070.01014.89
7.3.40.0020.01414.77
7.3.30.0050.00714.69
7.3.20.0070.00916.73
7.3.10.0050.00816.55
7.3.00.0090.00416.60
7.2.330.0090.01216.72
7.2.320.0160.00016.80
7.2.310.0060.01216.58
7.2.300.0150.00316.86
7.2.290.0080.00916.47
7.2.250.0060.01315.02
7.2.240.0070.01015.03
7.2.230.0060.00915.20
7.2.220.0060.00815.05
7.2.210.0080.01015.14
7.2.200.0070.00915.13
7.2.190.0050.00715.05
7.2.180.0060.01015.00
7.2.170.0080.00815.11
7.2.160.0060.00915.07
7.2.150.0120.00316.88
7.2.140.0030.01016.82
7.2.130.0030.01216.53
7.2.120.0070.00717.09
7.2.110.0040.01116.94
7.2.100.0000.01016.77
7.2.90.0040.01216.66
7.2.80.0030.01217.01
7.2.70.0060.01016.86
7.2.60.0100.00616.96
7.2.50.0060.00916.80
7.2.40.0070.00717.07
7.2.30.0070.00716.96
7.2.20.0090.00617.02
7.2.10.0040.01117.06
7.2.00.0040.01018.19
7.1.330.0100.00716.02
7.1.320.0060.00816.03
7.1.310.0090.00615.82
7.1.300.0090.00515.71
7.1.290.0050.00715.71
7.1.280.0090.00415.75
7.1.270.0030.01215.59
7.1.260.0060.00815.67
7.1.250.0090.00615.48
7.1.100.0080.00817.95
7.1.70.0000.01017.34
7.1.60.0030.02219.21
7.1.50.0170.00316.98
7.1.00.0030.05322.28
7.0.200.0000.00816.51
7.0.140.0030.07322.15
7.0.100.0200.07719.90
7.0.90.0000.05019.86
7.0.80.0100.06019.90
7.0.70.0030.08319.88
7.0.60.0230.04719.95
7.0.50.0200.03320.30
7.0.40.0170.06020.07
7.0.30.0130.07720.18
7.0.20.0000.04719.95
7.0.10.0030.05020.07
7.0.00.0070.07320.12
5.6.280.0100.06720.93
5.6.250.0070.05720.58
5.6.240.0030.04720.71
5.6.230.0100.05020.68
5.6.220.0030.04320.62
5.6.210.0100.05320.66
5.6.200.0070.04721.05
5.6.190.0130.08321.18
5.6.180.0070.04721.05
5.6.170.0130.07321.13
5.6.160.0030.05721.09
5.6.150.0030.04321.00
5.6.140.0100.04020.99
5.6.130.0100.08021.02
5.6.120.0000.08320.96
5.6.110.0100.04021.02
5.6.100.0070.04021.09
5.6.90.0030.06321.07
5.6.80.0130.03020.41
5.6.70.0070.03320.33
5.6.60.0170.07020.48
5.6.50.0100.07720.52
5.6.40.0070.07720.32
5.6.30.0070.07020.43
5.6.20.0070.04720.32
5.6.10.0030.03720.32
5.6.00.0030.05020.45
5.5.380.0200.06720.46
5.5.370.0030.08320.45
5.5.360.0070.06320.51
5.5.350.0000.07320.36
5.5.340.0130.06720.87
5.5.330.0030.08720.91
5.5.320.0030.04020.75
5.5.310.0030.05020.74
5.5.300.0070.05020.91
5.5.290.0030.08720.73
5.5.280.0070.03720.92
5.5.270.0130.07320.76
5.5.260.0030.06020.73
5.5.250.0130.06320.69
5.5.240.0100.03320.32
5.5.230.0070.08020.30
5.5.220.0000.04020.11
5.5.210.0130.07320.30
5.5.200.0070.03720.25
5.5.190.0070.03720.00
5.5.180.0030.04020.14
5.5.160.0070.03720.21
5.5.150.0030.05020.28
5.5.140.0000.04320.25
5.5.130.0100.03320.29
5.5.120.0000.04020.09
5.5.110.0070.03320.28
5.5.100.0070.03720.08
5.5.90.0000.04320.17
5.5.80.0100.03320.16
5.5.70.0070.03020.13
5.5.60.0100.02720.15
5.5.50.0130.03020.07
5.5.40.0030.03020.01
5.5.30.0000.04020.10
5.5.20.0000.03720.04
5.5.10.0030.04020.12
5.5.00.0100.02719.97
5.4.450.0130.07019.47
5.4.440.0070.08319.23
5.4.430.0070.04319.50
5.4.420.0130.06719.44
5.4.410.0030.07019.32
5.4.400.0130.05719.24
5.4.390.0070.08019.13
5.4.380.0100.05019.11
5.4.370.0130.05319.13
5.4.360.0070.06718.85
5.4.350.0070.06719.04
5.4.340.0000.05319.05
5.4.320.0000.04319.13
5.4.310.0000.04019.14
5.4.300.0030.03719.04
5.4.290.0100.02719.13
5.4.280.0030.04719.21
5.4.270.0070.03319.14
5.4.260.0000.04019.22
5.4.250.0030.04719.21
5.4.240.0030.03719.20
5.4.230.0000.03319.23
5.4.220.0030.03319.17
5.4.210.0000.03318.95
5.4.200.0070.03019.15
5.4.190.0070.03019.05
5.4.180.0000.03718.84
5.4.170.0070.03019.23
5.4.160.0070.03019.16
5.4.150.0070.04019.10
5.4.140.0030.03016.30
5.4.130.0130.03016.48
5.4.120.0000.04016.54
5.4.110.0000.04016.52
5.4.100.0000.03316.44
5.4.90.0030.03316.42
5.4.80.0070.02716.45
5.4.70.0030.04016.39
5.4.60.0030.03716.31
5.4.50.0100.05016.31
5.4.40.0070.02716.52
5.4.30.0000.03716.25
5.4.20.0030.03016.36
5.4.10.0030.03716.40
5.4.00.0030.03315.86
5.3.290.0070.04314.73
5.3.280.0000.03714.66
5.3.270.0100.03014.73
5.3.260.0000.04714.54
5.3.250.0070.02714.59
5.3.240.0030.03014.58
5.3.230.0000.04314.62
5.3.220.0030.03014.51
5.3.210.0000.04314.55
5.3.200.0000.04314.62
5.3.190.0070.03314.68
5.3.180.0000.03314.55
5.3.170.0000.03314.53
5.3.160.0000.03314.63
5.3.150.0030.03714.59
5.3.140.0030.03714.48
5.3.130.0070.03314.58
5.3.120.0270.02014.67
5.3.110.0000.03314.60
5.3.100.0000.04014.11
5.3.90.0070.03014.01
5.3.80.0000.03314.07
5.3.70.0030.04314.04
5.3.60.0070.03314.07
5.3.50.0030.03013.84
5.3.40.0000.03713.95
5.3.30.0070.02713.80
5.3.20.0030.03013.81
5.3.10.0030.03313.59
5.3.00.0070.05013.66
5.2.170.0030.02711.28
5.2.160.0030.02311.02
5.2.150.0070.02711.05
5.2.140.0000.02711.05
5.2.130.0030.02711.02
5.2.120.0000.03011.14
5.2.110.0130.05011.12
5.2.100.0070.06311.24
5.2.90.0070.02710.99
5.2.80.0000.04711.21
5.2.70.0000.06311.10
5.2.60.0100.04010.95
5.2.50.0070.06311.14
5.2.40.0100.03710.91
5.2.30.0000.04011.00
5.2.20.0000.03011.03
5.2.10.0000.05310.79
5.2.00.0030.04010.74
5.1.60.0000.05310.00
5.1.50.0070.0479.99
5.1.40.0030.0309.79
5.1.30.0030.02710.28
5.1.20.0000.02710.38
5.1.10.0000.05710.21
5.1.00.0000.05310.17
5.0.50.0100.0438.63
5.0.40.0030.0238.27
5.0.30.0000.0308.11
5.0.20.0000.0478.27
5.0.10.0000.0278.11
5.0.00.0130.0208.16
4.4.90.0030.0308.11
4.4.80.0030.0338.11
4.4.70.0000.0408.11
4.4.60.0030.0238.11
4.4.50.0000.0278.11
4.4.40.0100.0478.11
4.4.30.0000.0278.11
4.4.20.0000.0378.11
4.4.10.0000.0308.11
4.4.00.0000.0538.11
4.3.110.0030.0208.11
4.3.100.0000.0238.11
4.3.90.0000.0138.11
4.3.80.0000.0438.11
4.3.70.0000.0338.11
4.3.60.0000.0208.11
4.3.50.0030.0238.11
4.3.40.0000.0238.11
4.3.30.0030.0308.11
4.3.20.0000.0238.11
4.3.10.0030.0208.11
4.3.00.0000.0338.11

preferences:
53.68 ms | 401 KiB | 5 Q