3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Gender extends SplEnum { const MALE = 1 , FEMALE = 2 ; } // define a Person object with name, age and gender properties class Person { private $name , $age , $gender ; public function __construct($name, $age, Gender $gender) { $this->name = $name; $this->age = (int) $age; $this->gender = $gender; } public function isMale() { return ($this->gender == Gender::MALE); } public function isFemale() { return ($this->gender == Gender::FEMALE); } }

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.55
8.3.50.0230.00522.05
8.3.40.0040.01518.79
8.3.30.0140.00018.63
8.3.20.0050.00220.16
8.3.10.0080.00020.52
8.3.00.0050.00321.91
8.2.180.0140.00716.72
8.2.170.0150.00322.96
8.2.160.0100.00722.08
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00421.04
8.2.120.0070.00026.35
8.2.110.0090.00022.25
8.2.100.0030.00917.80
8.2.90.0050.00319.17
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0030.00618.09
8.2.40.0040.00420.65
8.2.30.0030.00619.51
8.2.20.0000.00717.72
8.2.10.0000.00718.12
8.2.00.0040.00418.04
8.1.280.0040.01125.92
8.1.270.0090.00022.19
8.1.260.0060.00328.09
8.1.250.0000.00728.09
8.1.240.0030.00622.48
8.1.230.0060.00617.64
8.1.220.0000.00917.79
8.1.210.0000.00818.77
8.1.200.0090.00017.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0000.00720.75
8.1.150.0070.00018.87
8.1.140.0040.00419.43
8.1.130.0070.00017.54
8.1.120.0000.00817.43
8.1.110.0040.00417.40
8.1.100.0000.00717.44
8.1.90.0000.00817.44
8.1.80.0040.00417.30
8.1.70.0000.00717.41
8.1.60.0050.00317.56
8.1.50.0050.00317.37
8.1.40.0040.00417.52
8.1.30.0060.00317.55
8.1.20.0000.00817.37
8.1.10.0040.00417.43
8.1.00.0070.00017.50
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00818.46
8.0.270.0000.00717.33
8.0.260.0070.00017.31
8.0.250.0000.00617.03
8.0.240.0040.00417.07
8.0.230.0000.00717.00
8.0.220.0050.00216.96
8.0.210.0040.00416.99
8.0.200.0000.00617.03
8.0.190.0030.00617.04
8.0.180.0050.00516.88
8.0.170.0000.00816.89
8.0.160.0030.00517.01
8.0.150.0040.00316.98
8.0.140.0000.00816.72
8.0.130.0000.00613.38
8.0.120.0000.00716.75
8.0.110.0000.00816.93
8.0.100.0030.00516.93
8.0.90.0000.00716.86
8.0.80.0090.00616.95
8.0.70.0000.00716.80
8.0.60.0040.00416.91
8.0.50.0000.00716.96
8.0.30.0070.01117.14
8.0.20.0140.00717.41
8.0.10.0040.00417.04
8.0.00.0080.01016.94
7.4.330.0000.00516.83
7.4.320.0030.00316.59
7.4.300.0000.00716.59
7.4.290.0030.00316.51
7.4.280.0080.00016.49
7.4.270.0090.00016.50
7.4.260.0040.00416.43
7.4.250.0040.00316.40
7.4.240.0070.00016.44
7.4.230.0070.00016.66
7.4.220.0070.01816.41
7.4.210.0030.01616.41
7.4.200.0030.00316.59
7.4.160.0100.01016.52
7.4.150.0140.00317.40
7.4.140.0140.00317.86
7.4.130.0100.01116.48
7.4.120.0130.00516.57
7.4.110.0100.00716.50
7.4.100.0100.00716.73
7.4.90.0080.00816.52
7.4.80.0050.01119.39
7.4.70.0080.00816.56
7.4.60.0100.00716.66
7.4.50.0060.00616.32
7.4.40.0100.00716.54
7.4.30.0120.00616.52
7.4.10.0060.01314.91
7.4.00.0100.00715.01
7.3.330.0000.00513.13
7.3.320.0020.00213.32
7.3.310.0000.00716.33
7.3.300.0070.00016.35
7.3.290.0020.01416.27
7.3.280.0050.01116.31
7.3.270.0090.00917.40
7.3.260.0090.01216.55
7.3.250.0090.00916.42
7.3.240.0090.01116.55
7.3.230.0100.00716.39
7.3.210.0140.00316.44
7.3.200.0120.00416.34
7.3.190.0060.00916.45
7.3.180.0080.00816.57
7.3.170.0000.01716.35
7.3.160.0070.01016.30
7.3.130.0060.00614.98
7.3.120.0050.01014.71
7.3.110.0060.01314.72
7.3.100.0060.01114.69
7.3.90.0030.01214.90
7.3.80.0070.00614.82
7.3.70.0020.01014.56
7.3.60.0050.01214.92
7.3.50.0020.01214.80
7.3.40.0070.00814.82
7.3.30.0040.01114.73
7.3.20.0050.00716.79
7.3.10.0040.01016.66
7.3.00.0080.00516.58
7.2.330.0240.00016.30
7.2.320.0110.00816.57
7.2.310.0080.00816.17
7.2.300.0030.01316.46
7.2.290.0110.01116.55
7.2.260.0070.01114.88
7.2.250.0080.01114.91
7.2.240.0090.00814.91
7.2.230.0070.00815.09
7.2.220.0070.01014.87
7.2.210.0050.01014.82
7.2.200.0030.01114.84
7.2.190.0020.01514.87
7.2.180.0020.01214.95
7.2.170.0030.00914.85
7.2.160.0040.01114.97
7.2.150.0070.00716.70
7.2.140.0070.00716.46
7.2.130.0050.00916.52
7.2.120.0080.00816.56
7.2.110.0130.00616.81
7.2.100.0180.00516.67
7.2.90.0110.01116.52
7.2.80.0170.00716.77
7.2.70.0130.01116.55
7.2.60.0060.01216.84
7.2.50.0110.01216.67
7.2.40.0070.00916.38
7.2.30.0080.01016.66
7.2.20.0120.00316.60
7.2.10.0140.00116.40
7.2.00.0070.01017.49
7.1.330.0050.01015.62
7.1.320.0040.01015.52
7.1.310.0040.00815.59
7.1.300.0100.00515.58
7.1.290.0070.00715.57
7.1.280.0070.00915.64
7.1.270.0070.00615.59
7.1.260.0010.01015.67
7.1.250.0120.00515.23
7.1.240.0060.00315.71
7.1.230.0070.00715.85
7.1.220.0120.00315.58
7.1.210.0060.00915.63
7.1.200.0030.01115.69
7.1.190.0110.00315.63
7.1.180.0030.01015.51
7.1.170.0060.00615.44
7.1.160.0090.00615.39
7.1.150.0040.01115.77
7.1.140.0060.00615.62
7.1.130.0080.00415.38
7.1.120.0030.00915.36
7.1.110.0070.00715.66
7.1.100.0040.00816.91
7.1.90.0040.00415.84
7.1.80.0030.01015.76
7.1.70.0040.00716.20
7.1.60.0100.00817.46
7.1.50.0080.01016.12
7.1.40.0090.00615.61
7.1.30.0100.00315.65
7.1.20.0000.01215.60
7.1.10.0050.00515.58
7.1.00.0050.04318.81
7.0.330.0070.00715.25
7.0.320.0040.00415.40
7.0.310.0000.01315.34
7.0.300.0040.00815.37
7.0.290.0060.00615.36
7.0.280.0090.00915.28
7.0.270.0000.01715.20
7.0.260.0030.00615.36
7.0.250.0060.00915.28
7.0.240.0040.00415.39
7.0.230.0000.01615.14
7.0.220.0110.00415.31
7.0.210.0070.00715.04
7.0.200.0090.00714.95
7.0.190.0140.00015.38
7.0.180.0120.00315.28
7.0.170.0030.00915.29
7.0.160.0030.01015.41
7.0.150.0030.00915.28
7.0.140.0060.00615.23
7.0.130.0090.00615.44
7.0.120.0060.00815.25
7.0.110.0000.01715.36
7.0.100.0030.01315.39
7.0.90.0120.00015.34
7.0.80.0070.00415.10
7.0.70.0030.01015.44
7.0.60.0040.03718.53
7.0.50.0050.03916.62
7.0.40.0030.02816.68
7.0.30.0300.03716.81
7.0.20.0150.03916.79
7.0.10.0050.03216.79
7.0.00.0050.02516.76
5.6.400.0060.00614.02
5.6.390.0100.00714.28
5.6.380.0000.01514.02
5.6.370.0030.00614.02
5.6.360.0060.00614.11
5.6.350.0090.00914.29
5.6.340.0120.00314.09
5.6.330.0030.01013.91
5.6.320.0060.00614.29
5.6.310.0060.00914.38
5.6.300.0000.01114.24
5.6.290.0110.00414.29
5.6.280.0030.02417.63
5.6.270.0070.01114.25
5.6.260.0100.00014.27
5.6.250.0030.01014.05
5.6.240.0000.00914.28
5.6.230.0100.00314.04
5.6.220.0040.00714.14
5.6.210.0070.04017.35
5.6.200.0050.04216.09
5.6.190.0050.04917.46
5.6.180.0190.02717.39
5.6.170.0100.02917.34
5.6.160.0040.03417.33
5.6.150.0070.02516.28
5.6.140.0080.02016.13
5.6.130.0070.04716.14
5.6.120.0030.03517.50
5.6.110.0120.04017.50
5.6.100.0080.02317.49
5.6.90.0020.02717.65
5.6.80.0080.04117.14
5.6.70.0040.01114.20
5.6.60.0030.01014.29
5.6.50.0030.01414.13
5.6.40.0060.00914.35
5.6.30.0040.00814.00
5.6.20.0080.00813.85
5.6.10.0040.00814.31
5.6.00.0090.00614.07
5.5.380.0070.00714.02
5.5.370.0090.00614.06
5.5.360.0030.00513.83
5.5.350.0240.03317.06
5.5.340.0030.03816.02
5.5.330.0070.02417.11
5.5.320.0270.04217.08
5.5.310.0170.03717.17
5.5.300.0100.02015.95
5.5.290.0030.04816.00
5.5.280.0070.03917.49
5.5.270.0100.02217.47
5.5.260.0130.03817.47
5.5.250.0050.02317.30
5.5.240.0150.03017.15
5.5.230.0000.01114.08
5.5.220.0070.00714.04
5.5.210.0000.01113.77
5.5.200.0150.00014.11
5.5.190.0030.01014.16
5.5.180.0070.00713.65
5.5.170.0000.01614.28
5.5.160.0100.00014.19
5.5.150.0060.00313.83
5.5.140.0000.01113.72
5.5.130.0000.01313.93
5.5.120.0000.00913.98
5.5.110.0090.00613.47
5.5.100.0060.00313.91
5.5.90.0030.01013.77
5.5.80.0030.01213.75
5.5.70.0110.00413.73
5.5.60.0030.00713.89
5.5.50.0070.00413.90
5.5.40.0040.01113.92
5.5.30.0030.01013.87
5.5.20.0080.00814.02
5.5.10.0040.01113.72
5.5.00.0050.00513.95

preferences:
77.84 ms | 401 KiB | 5 Q