3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function __call($name, $value) { $type = substr($name, 0, 3); $variable = lcfirst(substr($name, 3)); if($type == 'get'){ return $this->$variable; } if($type == 'set'){ $this->$variable = $value[0]; return $this; } return call_user_func_array(array($this, $name), $value); } /*public function setEmail($email) { $trace=debug_backtrace(); $caller=array_shift($trace); echo "Called by {$caller['function']}"; if (isset($caller['class'])) { echo " in {$caller['class']}"; } $this->email = $email; return $this; }*/ } $user = new User(); $user->__call('setEmail', ['foo@bar.baz']); var_dump($user); $user->setEmail('foo2@bar.baz'); var_dump($user);

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.40.0060.01318.80
8.3.30.0090.00618.75
8.3.20.0040.00418.77
8.3.10.0080.00018.73
8.3.00.0040.00419.25
8.2.170.0150.00619.21
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0000.00826.16
8.2.120.0000.00721.03
8.2.110.0090.00022.27
8.2.100.0110.00418.03
8.2.90.0000.00918.21
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0040.00418.05
8.2.50.0110.00018.07
8.2.40.0050.00319.47
8.2.30.0000.00917.65
8.2.20.0040.00717.69
8.2.10.0040.00417.64
8.2.00.0030.00617.82
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00322.07
8.1.230.0060.01022.58
8.1.220.0030.00617.79
8.1.210.0000.00818.77
8.1.200.0080.00017.35
8.1.190.0060.00317.22
8.1.180.0030.00619.31
8.1.170.0040.00418.91
8.1.160.0070.00019.00
8.1.150.0050.00318.72
8.1.140.0040.00417.41
8.1.130.0070.00019.22
8.1.120.0000.00717.50
8.1.110.0040.00417.50
8.1.100.0020.00517.48
8.1.90.0040.00417.47
8.1.80.0030.00317.43
8.1.70.0030.00317.40
8.1.60.0040.00417.53
8.1.50.0040.00417.50
8.1.40.0060.00317.54
8.1.30.0090.00017.50
8.1.20.0040.00417.70
8.1.10.0000.00817.66
8.1.00.0080.00017.54
8.0.300.0040.00419.77
8.0.290.0000.00916.63
8.0.280.0040.00418.59
8.0.270.0000.00717.26
8.0.260.0000.00716.85
8.0.250.0050.00316.89
8.0.240.0070.00016.89
8.0.230.0030.00316.88
8.0.220.0070.00016.88
8.0.210.0070.00016.80
8.0.200.0000.00616.95
8.0.190.0040.00416.89
8.0.180.0000.00716.91
8.0.170.0030.00616.95
8.0.160.0000.00716.89
8.0.150.0030.00616.84
8.0.140.0030.00616.93
8.0.130.0060.00013.35
8.0.120.0030.00616.78
8.0.110.0000.00716.89
8.0.100.0040.00416.84
8.0.90.0080.00016.91
8.0.80.0090.01216.96
8.0.70.0000.00816.73
8.0.60.0000.00816.97
8.0.50.0040.00416.80
8.0.30.0140.00717.07
8.0.20.0100.00817.13
8.0.10.0080.00016.90
8.0.00.0060.01216.71
7.4.330.0000.00512.93
7.4.320.0040.00416.50
7.4.300.0000.00616.63
7.4.290.0030.00316.51
7.4.280.0030.00416.51
7.4.270.0000.00816.60
7.4.260.0050.00013.25
7.4.250.0000.00816.50
7.4.240.0040.00416.59
7.4.230.0030.00316.52
7.4.220.0110.00716.46
7.4.210.0100.01016.61
7.4.200.0070.00016.60
7.4.190.0000.00716.79
7.4.160.0090.00616.49
7.4.150.0120.00616.51
7.4.140.0110.01417.86
7.4.130.0160.01216.43
7.4.120.0150.00316.65
7.4.110.0070.01216.59
7.4.100.0030.01316.45
7.4.90.0090.01516.48
7.4.80.0060.01019.39
7.4.70.0070.01316.52
7.4.60.0030.01316.50
7.4.50.0040.00416.27
7.4.40.0040.01516.49
7.4.30.0070.01016.56
7.4.00.0070.01014.82
7.3.330.0000.00613.29
7.3.320.0000.00613.31
7.3.310.0000.00716.34
7.3.300.0000.00916.37
7.3.290.0080.00716.36
7.3.280.0070.01416.36
7.3.270.0040.01516.37
7.3.260.0090.00916.42
7.3.240.0110.01216.62
7.3.230.0110.00616.41
7.3.210.0170.00016.60
7.3.200.0110.00616.67
7.3.190.0070.01116.36
7.3.180.0070.01016.37
7.3.170.0060.00916.51
7.3.160.0060.01016.68
7.3.120.0060.01214.98
7.3.110.0050.01014.91
7.3.100.0070.00914.72
7.3.90.0040.00914.88
7.3.80.0050.00914.77
7.3.70.0030.00914.94
7.3.60.0050.00714.77
7.3.50.0050.00614.82
7.3.40.0050.00614.76
7.3.30.0100.00414.85
7.3.20.0090.00516.69
7.3.10.0090.00816.66
7.3.00.0060.00616.69
7.2.330.0080.00816.57
7.2.320.0060.01216.47
7.2.310.0070.01516.55
7.2.300.0000.01616.58
7.2.290.0110.00716.33
7.2.250.0070.01315.16
7.2.240.0040.01315.13
7.2.230.0050.01215.11
7.2.220.0030.01115.13
7.2.210.0070.00915.01
7.2.200.0050.00915.12
7.2.190.0040.01015.10
7.2.180.0090.00215.03
7.2.170.0060.01015.11
7.2.160.0060.00314.94
7.2.150.0070.00416.91
7.2.140.0110.00416.54
7.2.130.0030.01016.90
7.2.120.0100.00516.87
7.2.110.0030.01217.07
7.2.100.0050.00916.94
7.2.90.0100.00517.01
7.2.80.0050.00917.10
7.2.70.0040.00616.98
7.2.60.0030.01216.90
7.2.50.0030.00916.89
7.2.40.0040.00716.99
7.2.30.0050.00916.82
7.2.20.0060.00916.70
7.2.10.0070.00816.88
7.2.00.0040.01217.55
7.1.330.0030.00915.87
7.1.320.0020.00815.90
7.1.310.0080.00515.85
7.1.300.0080.00815.73
7.1.290.0090.00715.96
7.1.280.0050.01015.79
7.1.270.0060.00915.77
7.1.260.0030.00915.84
7.1.250.0030.00715.65
7.1.200.0080.00315.59
7.1.70.0000.01117.33
7.1.60.0170.00719.25
7.1.50.0100.01616.85
7.1.00.0030.07322.32
7.0.200.0140.00714.50
7.0.140.0070.07022.21
7.0.120.0030.07322.13
7.0.60.0000.06020.06
7.0.50.0070.08717.94
7.0.40.0000.07017.72
7.0.30.0000.05317.76
7.0.20.0100.05017.75
7.0.10.0070.06717.78
7.0.00.0030.07317.85
5.6.280.0070.07020.99
5.6.210.0000.07020.46
5.6.200.0070.04318.29
5.6.190.0100.05718.23
5.6.180.0000.06718.25
5.6.170.0070.08018.14
5.6.160.0070.05318.19
5.6.150.0070.07718.15
5.6.140.0100.08018.18
5.6.130.0100.08018.28
5.6.120.0070.07318.18
5.6.110.0000.04718.13
5.6.100.0030.08318.22
5.6.90.0100.06318.23
5.6.80.0170.03717.60
5.6.70.0070.04717.61
5.6.60.0030.05717.61
5.6.50.0070.06317.53
5.6.40.0070.06717.53
5.6.30.0100.07017.50
5.6.20.0070.06717.51
5.6.10.0100.07717.63
5.6.00.0030.07717.62
5.5.350.0130.05720.32
5.5.340.0000.05317.94
5.5.330.0030.06718.09
5.5.320.0000.05717.99
5.5.310.0030.04317.98
5.5.300.0070.04718.03
5.5.290.0100.07718.08
5.5.280.0070.05017.98
5.5.270.0200.07017.93
5.5.260.0100.07318.00
5.5.250.0070.05017.79
5.5.240.0100.07717.33
5.5.230.0170.06017.45
5.5.220.0100.07017.32
5.5.210.0130.05717.36
5.5.200.0170.07017.34
5.5.190.0100.07317.27
5.5.180.0100.06317.37
5.5.160.0030.08317.32
5.5.150.0070.07717.29
5.5.140.0030.08317.32
5.5.130.0070.04317.32
5.5.120.0100.07317.42
5.5.110.0030.08317.36
5.5.100.0030.05017.24
5.5.90.0070.04317.34
5.5.80.0070.07717.24
5.5.70.0070.06317.22
5.5.60.0070.04717.27
5.5.50.0070.07317.22
5.5.40.0030.07717.21
5.5.30.0030.05017.32
5.5.20.0070.05317.22
5.5.10.0000.04317.17
5.5.00.0070.06317.21
5.4.450.0100.06719.59
5.4.440.0000.04719.36
5.4.430.0100.04319.45
5.4.420.0170.05719.41
5.4.410.0000.08019.25
5.4.400.0000.04319.02
5.4.390.0130.07319.11
5.4.380.0030.05019.05
5.4.370.0000.04318.95
5.4.360.0130.06319.01
5.4.350.0070.07319.05
5.4.340.0000.04719.05
5.4.320.0170.04319.13
5.4.310.0000.05019.07
5.4.300.0100.07019.27
5.4.290.0100.07019.12
5.4.280.0070.05718.97
5.4.270.0100.06319.02
5.4.260.0030.04719.04
5.4.250.0030.05319.00
5.4.240.0130.05319.07
5.4.230.0070.04319.11
5.4.220.0030.04019.10
5.4.210.0100.05319.02
5.4.200.0130.07319.15
5.4.190.0070.07319.11
5.4.180.0030.04019.10
5.4.170.0070.08019.08
5.4.160.0070.04319.11
5.4.150.0100.06019.02
5.4.140.0070.07016.38
5.4.130.0100.07316.45
5.4.120.0130.07016.31
5.4.110.0100.07316.34
5.4.100.0030.07716.24
5.4.90.0170.07016.37
5.4.80.0030.07016.39
5.4.70.0070.07316.43
5.4.60.0000.05716.27
5.4.50.0070.04016.38
5.4.40.0000.04716.50
5.4.30.0130.02716.20
5.4.20.0070.05016.39
5.4.10.0070.03316.29
5.4.00.0000.04315.79
5.3.290.0070.07714.89
5.3.280.0130.07014.64
5.3.270.0070.07014.59
5.3.260.0000.05314.63
5.3.250.0000.06314.61
5.3.240.0100.04314.82
5.3.230.0130.07014.81
5.3.220.0070.05014.61
5.3.210.0100.07314.53
5.3.200.0130.07014.41
5.3.190.0100.06714.78
5.3.180.0030.08314.62
5.3.170.0070.07314.63
5.3.160.0170.04014.63
5.3.150.0070.04314.60
5.3.140.0130.06714.55
5.3.130.0000.04314.50
5.3.120.0070.05714.56
5.3.110.0000.04714.60
5.3.100.0000.05314.25
5.3.90.0100.07014.07
5.3.80.0070.03714.05
5.3.70.0030.04014.02
5.3.60.0030.05014.04
5.3.50.0030.04314.04
5.3.40.0070.04713.98
5.3.30.0130.06713.97
5.3.20.0100.06713.59
5.3.10.0100.06713.72
5.3.00.0030.06013.59
5.2.170.0030.06311.05
5.2.160.0070.04011.04
5.2.150.0000.06711.36
5.2.140.0000.05311.01
5.2.130.0070.05011.14
5.2.120.0000.04311.09
5.2.110.0130.04711.32
5.2.100.0030.04711.31
5.2.90.0000.05011.14
5.2.80.0030.05311.10
5.2.70.0030.06011.10
5.2.60.0000.06710.90
5.2.50.0030.04310.87
5.2.40.0030.03310.89
5.2.30.0170.05010.99
5.2.20.0030.06011.02
5.2.10.0100.05010.82
5.2.00.0000.03710.67
5.1.60.0000.02710.04
5.1.50.0100.0509.98
5.1.40.0000.05710.02
5.1.30.0070.05710.38
5.1.20.0030.04010.39
5.1.10.0000.06310.06
5.1.00.0070.05310.07
5.0.50.0030.0279.12
5.0.40.0030.0339.12
5.0.30.0070.0479.12
5.0.20.0070.0379.12
5.0.10.0070.0409.12
5.0.00.0100.0509.12
4.4.90.0000.0309.12
4.4.80.0000.0379.12
4.4.70.0030.0239.12
4.4.60.0030.0209.12
4.4.50.0030.0209.12
4.4.40.0030.0509.12
4.4.30.0000.0379.12
4.4.20.0000.0379.12
4.4.10.0000.0409.12
4.4.00.0000.0579.12
4.3.110.0130.0239.12
4.3.100.0030.0279.12
4.3.90.0070.0279.12
4.3.80.0070.0479.12
4.3.70.0030.0339.12
4.3.60.0030.0279.12
4.3.50.0070.0339.12
4.3.40.0000.0579.12
4.3.30.0030.0339.12
4.3.20.0000.0279.12
4.3.10.0030.0339.12
4.3.00.0070.0209.12

preferences:
47.66 ms | 404 KiB | 6 Q