3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Profile_Model_Profile { protected $_userId; protected $_email; protected $_firstName; protected $_lastName; protected $_midName; /** * @var Core_Model_File */ protected $_cvFile; /** * @var Profile_Model_Affil */ protected $_affil; public function __isset($key) { return isset($this->{'_' . self::toCamelCase($key)}); } public function __get($key) { $property = '_' . self::toCamelCase($key); if (property_exists($this, $property)) { return $property; } throw new RuntimeException(sprintf('Invalid property: %s', $property)); } public function __set($key, $value) { $key = self::toCamelCase($key); $setter = 'set' . $key; if (method_exists($this, $setter)) { return $this->{$setter}($value); } $property = '_' . $key; if (property_exists($this, $property)) { $this->{$property} = $value; return; } throw new RuntimeException(sprintf('Invalid property: %s', $property)); } /** * Transform given string to camel-case. * * @param string $str * @return string */ public static function toCamelCase($str) { if (is_array($str) && isset($str[1])) { return strtoupper($str[1]); } return preg_replace_callback( '/_(\w)/', array(__CLASS__, __FUNCTION__), (string) $str ); } }

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.0070.01018.00
8.3.50.0130.00721.92
8.3.40.0130.00718.62
8.3.30.0040.01120.17
8.3.20.0000.00820.30
8.3.10.0030.00621.96
8.3.00.0060.00322.27
8.2.180.0070.01116.50
8.2.170.0060.00922.96
8.2.160.0100.00720.38
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0110.00326.16
8.2.120.0040.00419.51
8.2.110.0000.00922.11
8.2.100.0110.00417.66
8.2.90.0040.00419.13
8.2.80.0050.00319.46
8.2.70.0040.00417.38
8.2.60.0040.00417.68
8.2.50.0060.00318.07
8.2.40.0000.00818.16
8.2.30.0040.00417.95
8.2.20.0070.00317.65
8.2.10.0000.00817.53
8.2.00.0100.00017.49
8.1.280.0130.00325.92
8.1.270.0030.00524.66
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00723.97
8.1.230.0070.00419.20
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0090.00017.40
8.1.180.0000.00818.10
8.1.170.0040.00418.57
8.1.160.0070.00022.26
8.1.150.0060.00318.58
8.1.140.0040.00417.26
8.1.130.0070.00017.81
8.1.120.0040.00417.45
8.1.110.0030.00617.38
8.1.100.0000.00717.29
8.1.90.0000.00717.45
8.1.80.0080.00017.40
8.1.70.0000.00717.34
8.1.60.0030.00617.52
8.1.50.0040.00417.33
8.1.40.0050.00317.49
8.1.30.0000.00817.48
8.1.20.0000.00917.58
8.1.10.0040.00417.44
8.1.00.0060.00317.36
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0070.00018.30
8.0.270.0040.00417.11
8.0.260.0030.00316.76
8.0.250.0000.00716.96
8.0.240.0070.00016.76
8.0.230.0040.00416.91
8.0.220.0000.00716.86
8.0.210.0040.00416.70
8.0.200.0000.00716.90
8.0.190.0000.00716.89
8.0.180.0040.00416.88
8.0.170.0040.00416.75
8.0.160.0000.00716.81
8.0.150.0030.00516.70
8.0.140.0040.00416.80
8.0.130.0030.00313.23
8.0.120.0040.00416.79
8.0.110.0040.00416.86
8.0.100.0040.00416.81
8.0.90.0000.00716.80
8.0.80.0150.00016.71
8.0.70.0000.00716.81
8.0.60.0040.00416.75
8.0.50.0000.00716.89
8.0.30.0110.00917.08
8.0.20.0110.00817.40
8.0.10.0040.00416.75
8.0.00.0140.01316.71
7.4.330.0030.00315.00
7.4.320.0000.00716.54
7.4.300.0030.00616.59
7.4.290.0040.00316.43
7.4.280.0030.00616.54
7.4.270.0030.00316.46
7.4.260.0060.00316.55
7.4.250.0000.00716.55
7.4.240.0020.00516.42
7.4.230.0000.00716.38
7.4.220.0180.00716.57
7.4.210.0100.00716.48
7.4.200.0030.00316.35
7.4.190.0000.00716.54
7.4.160.0220.00016.47
7.4.150.0120.00817.40
7.4.140.0080.01317.86
7.4.130.0110.00616.56
7.4.120.0070.01516.42
7.4.110.0080.00816.51
7.4.100.0160.00316.35
7.4.90.0070.01016.48
7.4.80.0150.00719.39
7.4.70.0050.01116.28
7.4.60.0060.01016.34
7.4.50.0030.00516.21
7.4.40.0110.00722.77
7.4.30.0110.01016.58
7.4.00.0090.00614.66
7.3.330.0000.00613.12
7.3.320.0030.00313.20
7.3.310.0030.00316.26
7.3.300.0000.00816.18
7.3.290.0070.00716.19
7.3.280.0080.00916.21
7.3.270.0100.00717.40
7.3.260.0120.00616.26
7.3.250.0140.00716.28
7.3.240.0100.00716.43
7.3.230.0130.00316.39
7.3.210.0070.01716.35
7.3.200.0160.00019.39
7.3.190.0160.00316.50
7.3.180.0060.00916.09
7.3.170.0090.00616.27
7.3.160.0060.00916.23
7.3.120.0060.00614.71
7.3.10.0160.00316.11
7.3.00.0110.00616.32
7.2.330.0100.01416.54
7.2.320.0050.02016.40
7.2.310.0130.00316.26
7.2.300.0070.01516.51
7.2.290.0130.00316.63
7.2.130.0090.00616.14
7.2.120.0030.01316.18
7.2.110.0160.00616.51
7.2.100.0130.00616.18
7.2.90.0090.00616.60
7.2.80.0150.00616.51
7.2.70.0140.00416.20
7.2.60.0160.00316.54
7.2.50.0130.01316.22
7.2.40.0100.01016.42
7.2.30.0160.00316.86
7.2.20.0040.01116.40
7.2.10.0190.00016.51
7.2.00.0120.00816.42
7.1.250.0070.00715.44
7.1.70.0100.00317.04
7.1.60.0060.00919.43
7.1.50.0220.01334.83
7.1.00.0030.04022.48
7.0.200.0000.00816.66
7.0.140.0030.07322.07
7.0.110.0570.05020.03
7.0.100.0600.08019.93
7.0.90.0470.06019.87
7.0.80.0570.08020.01
7.0.70.0600.05319.91
7.0.60.0630.07720.04
7.0.50.0500.08319.92
7.0.40.0100.08719.66
7.0.30.0100.08019.65
7.0.20.0070.08019.79
7.0.10.0200.06719.77
7.0.00.0030.04719.80
5.6.280.0100.09321.08
5.6.260.0000.08020.59
5.6.250.0100.07720.61
5.6.240.0100.05320.66
5.6.230.0170.07320.62
5.6.220.0070.08320.50
5.6.210.0070.04320.76
5.6.200.0100.08020.65
5.6.190.0100.07320.49
5.6.180.0130.07720.55
5.6.170.0070.07320.59
5.6.160.0070.08720.61
5.6.150.0130.04720.44
5.6.140.0170.07320.80
5.6.130.0030.08020.64
5.6.120.0070.07320.59
5.6.110.0130.07720.50
5.6.100.0070.08020.79
5.6.90.0130.06720.63
5.6.80.0170.06719.95
5.6.70.0070.07319.96
5.6.60.0030.06720.04
5.6.50.0070.08319.96
5.6.40.0070.07720.16
5.6.30.0070.05319.96
5.6.20.0100.07319.96
5.6.10.0000.08319.87
5.6.00.0100.07319.99
5.5.380.0070.07317.70
5.5.370.0100.07317.60
5.5.360.0130.07317.53
5.5.350.0130.05717.54
5.5.340.0130.06717.91
5.5.330.0070.08317.93
5.5.320.0070.07717.95
5.5.310.0030.06718.09
5.5.300.0000.06318.13
5.5.290.0070.08318.20
5.5.280.0200.06317.93
5.5.270.0070.08018.09
5.5.260.0100.07718.11
5.5.250.0030.08317.88
5.5.240.0030.07717.25
5.5.230.0130.07017.47
5.5.220.0100.03717.29
5.5.210.0030.08317.47
5.5.200.0070.07717.48
5.5.190.0000.05717.45
5.5.180.0170.06717.45
5.5.160.0100.07317.60
5.5.150.0000.07717.27
5.5.140.0070.03717.43
5.5.130.0100.03317.26
5.5.120.0030.05317.39
5.5.110.0030.04017.57
5.5.100.0030.04017.48
5.5.90.0000.04717.18
5.5.80.0030.04317.16
5.5.70.0070.03317.31
5.5.60.0000.04017.37
5.5.50.0000.04017.31
5.5.40.0000.03717.20
5.5.30.0030.04717.37
5.5.20.0070.03317.28
5.5.10.0000.04017.34
5.5.00.0070.03317.45
5.4.450.0100.07719.34
5.4.440.0130.07019.31
5.4.430.0130.07719.61
5.4.420.0130.07319.22
5.4.410.0170.06719.46
5.4.400.0130.06719.20
5.4.390.0000.08019.19
5.4.380.0100.04718.99
5.4.370.0070.03719.29
5.4.360.0030.06319.14
5.4.350.0130.03018.98
5.4.340.0070.07719.20
5.4.320.0100.07019.09
5.4.310.0070.08018.96
5.4.300.0170.08019.03
5.4.290.0070.05318.98
5.4.280.0000.08019.13
5.4.270.0070.03719.17
5.4.260.0100.03318.95
5.4.250.0070.03719.05
5.4.240.0030.03719.13
5.4.230.0070.03019.19
5.4.220.0000.04019.17
5.4.210.0070.03019.09
5.4.200.0030.03318.94
5.4.190.0000.04019.28
5.4.180.0000.05018.89
5.4.170.0030.07319.03
5.4.160.0000.04319.18
5.4.150.0030.03718.96
5.4.140.0000.05016.32
5.4.130.0070.07316.32
5.4.120.0130.06316.48
5.4.110.0030.03716.51
5.4.100.0070.04316.33
5.4.90.0070.03316.61
5.4.80.0000.04016.47
5.4.70.0070.03016.51
5.4.60.0070.04316.37
5.4.50.0030.04316.60
5.4.40.0030.04716.57
5.4.30.0030.03716.47
5.4.20.0000.04016.46
5.4.10.0030.03716.57
5.4.00.0030.03315.95
5.3.290.0130.07014.71
5.3.280.0030.03714.64
5.3.270.0000.06714.65
5.3.260.0070.05314.48
5.3.250.0130.05314.71
5.3.240.0000.04314.61
5.3.230.0070.07314.64
5.3.220.0100.03014.59
5.3.210.0000.04014.81
5.3.200.0000.04014.66
5.3.190.0000.04014.71
5.3.180.0000.04314.43
5.3.170.0030.03314.54
5.3.160.0030.03714.58
5.3.150.0070.06714.61
5.3.140.0000.05014.53
5.3.130.0030.06714.52
5.3.120.0000.04014.69
5.3.110.0030.03714.52
5.3.100.0000.04014.05
5.3.90.0030.03314.05
5.3.80.0000.03314.26
5.3.70.0130.05014.05
5.3.60.0000.04014.01
5.3.50.0000.03314.10
5.3.40.0000.04013.96
5.3.30.0000.04313.98
5.3.20.0000.04313.77
5.3.10.0030.05713.68
5.3.00.0030.04013.64
5.2.170.0000.03011.17
5.2.160.0030.03311.16
5.2.150.0030.03011.17
5.2.140.0030.04711.11
5.2.130.0000.05011.12
5.2.120.0070.02010.97
5.2.110.0000.03311.09
5.2.100.0030.03011.13
5.2.90.0000.03711.17
5.2.80.0030.03311.12
5.2.70.0130.01711.11
5.2.60.0000.04711.07
5.2.50.0100.03310.89
5.2.40.0070.02311.02
5.2.30.0030.03711.13
5.2.20.0000.05310.93
5.2.10.0000.03010.89
5.2.00.0000.03010.59
5.1.60.0000.04310.02
5.1.50.0030.02710.07
5.1.40.0000.05710.07
5.1.30.0070.05710.35
5.1.20.0100.04710.61
5.1.10.0000.04010.07
5.1.00.0030.05310.02
5.0.50.0030.04310.02
5.0.40.0030.03010.02
5.0.30.0000.06710.02
5.0.20.0030.04710.02
5.0.10.0030.04010.02
5.0.00.0000.06710.02
4.4.90.0000.01710.02
4.4.80.0000.01710.02
4.4.70.0000.01710.02
4.4.60.0000.01710.02
4.4.50.0000.01710.02
4.4.40.0030.03710.02
4.4.30.0070.03010.02
4.4.20.0000.03310.02
4.4.10.0030.03710.02
4.4.00.0000.05710.02
4.3.110.0070.03010.02
4.3.100.0070.02710.02
4.3.90.0070.01310.02
4.3.80.0000.04710.02
4.3.70.0030.03310.02
4.3.60.0030.02310.02
4.3.50.0000.03010.02
4.3.40.0000.05310.02
4.3.30.0030.03310.02
4.3.20.0030.03310.02
4.3.10.0000.03710.02
4.3.00.0070.03010.02

preferences:
45.52 ms | 400 KiB | 5 Q