3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * ageCheck method * * This is a custom validation method that converts the date of birth into an age and then checks to see if the age falls within the teams level age range * * @param array $check This is the value for date of birth field * @param string $level_id This is the level_id selected for this competitor's team * @return bool */ function ageCheck($check, $level_id) { $dob = array_shift($check); $dob = new DateTime($dob); $today = new DateTime('today'); $age = $dob->diff($today)->y; $age_range = '35-35'; $age_range_arr = explode('-', $age_range); if (stripos($age_range,'N/A') !== false) { return true; } if ($age >= $age_range_arr[0] && $age <= $age_range_arr[1]) { return true; } return 'You must select a date of birth where the competitor\'s age is between ' . $age_range_arr[0] . ' and ' . $age_range_arr[1] . ' years old'; } echo ageCheck(array('dob' => '1978-11-21'), NULL);

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.70.0090.00616.88
8.3.60.0110.00716.75
8.3.50.0120.00722.13
8.3.40.0110.00418.91
8.3.30.0130.00319.04
8.3.20.0040.00420.16
8.3.10.0080.00023.48
8.3.00.0060.00617.63
8.2.180.0140.00418.29
8.2.170.0100.01022.96
8.2.160.0110.00420.38
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00222.18
8.2.110.0100.00021.04
8.2.100.0040.00717.97
8.2.90.0050.00318.47
8.2.80.0000.00818.16
8.2.70.0000.00917.88
8.2.60.0040.00417.88
8.2.50.0040.00417.88
8.2.40.0060.00320.01
8.2.30.0060.00318.14
8.2.20.0000.00817.96
8.2.10.0050.00218.17
8.2.00.0000.00818.05
8.1.280.0000.01525.92
8.1.270.0080.00023.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00424.02
8.1.230.0100.00320.96
8.1.220.0040.00417.77
8.1.210.0000.00818.90
8.1.200.0040.00417.48
8.1.190.0030.00517.47
8.1.180.0000.00818.10
8.1.170.0030.00518.59
8.1.160.0000.00822.06
8.1.150.0050.00318.75
8.1.140.0000.00817.63
8.1.130.0030.00317.86
8.1.120.0040.00417.70
8.1.110.0040.00417.54
8.1.100.0000.00717.57
8.1.90.0050.00217.61
8.1.80.0040.00417.64
8.1.70.0000.00817.54
8.1.60.0030.00617.68
8.1.50.0050.00317.62
8.1.40.0030.00517.54
8.1.30.0050.00317.66
8.1.20.0000.00817.67
8.1.10.0030.00517.58
8.1.00.0080.00017.75
8.0.300.0000.00719.83
8.0.290.0080.00016.88
8.0.280.0030.00318.57
8.0.270.0040.00417.27
8.0.260.0070.00017.26
8.0.250.0000.00817.08
8.0.240.0060.00317.05
8.0.230.0040.00417.06
8.0.220.0000.00717.13
8.0.210.0030.00317.09
8.0.200.0070.00017.12
8.0.190.0050.00317.19
8.0.180.0040.00417.08
8.0.170.0000.00717.14
8.0.160.0040.00417.17
8.0.150.0020.00517.00
8.0.140.0000.00717.12
8.0.130.0000.00613.46
8.0.120.0040.00417.06
8.0.110.0040.00417.11
8.0.100.0030.00517.05
8.0.90.0020.00517.16
8.0.80.0060.01017.04
8.0.70.0050.00316.90
8.0.60.0050.00316.95
8.0.50.0040.00417.13
8.0.30.0100.01017.04
8.0.20.0130.00817.40
8.0.10.0040.00417.04
8.0.00.0090.01116.91
7.4.330.0000.00515.15
7.4.320.0000.00716.69
7.4.300.0030.00316.66
7.4.290.0030.00316.74
7.4.280.0070.00016.64
7.4.270.0040.00416.70
7.4.260.0000.00816.65
7.4.250.0080.00016.61
7.4.240.0020.00516.67
7.4.230.0000.00716.48
7.4.220.0090.00916.82
7.4.210.0080.00916.75
7.4.200.0070.00016.78
7.4.190.0000.00716.65
7.4.160.0040.01216.70
7.4.150.0070.01017.40
7.4.140.0110.00817.86
7.4.130.0110.01116.66
7.4.120.0070.01116.70
7.4.110.0150.00216.72
7.4.100.0110.01116.68
7.4.90.0060.01216.66
7.4.80.0140.00319.39
7.4.70.0140.00416.87
7.4.60.0100.00916.70
7.4.50.0000.00816.84
7.4.40.0120.00916.43
7.4.30.0100.00716.57
7.4.10.0060.00615.15
7.4.00.0050.01215.01
7.3.330.0000.00513.49
7.3.320.0060.00013.51
7.3.310.0050.00216.52
7.3.300.0070.00016.48
7.3.290.0040.01016.38
7.3.280.0100.00716.43
7.3.270.0040.01317.40
7.3.260.0170.00516.39
7.3.250.0090.01016.59
7.3.240.0060.01116.79
7.3.230.0070.01016.66
7.3.210.0130.00316.77
7.3.200.0000.02119.39
7.3.190.0180.00316.75
7.3.180.0030.01316.57
7.3.170.0090.00916.62
7.3.160.0080.00816.81
7.3.130.0090.00914.96
7.3.120.0110.00515.05
7.3.110.0100.01014.95
7.3.100.0040.01214.99
7.3.90.0040.00814.79
7.3.80.0040.00915.11
7.3.70.0000.00915.02
7.3.60.0120.00315.02
7.3.50.0060.00914.83
7.3.40.0030.00714.67
7.3.30.0030.01014.77
7.3.20.0030.01416.91
7.3.10.0060.00917.05
7.3.00.0030.01016.76
7.2.330.0110.00616.97
7.2.320.0090.00916.84
7.2.310.0120.00416.59
7.2.300.0140.00316.93
7.2.290.0150.00916.95
7.2.260.0000.01915.45
7.2.250.0000.01715.23
7.2.240.0070.01015.18
7.2.230.0000.01715.04
7.2.220.0070.00715.51
7.2.210.0000.01415.11
7.2.200.0090.00615.20
7.2.190.0070.01115.20
7.2.180.0060.01215.02
7.2.170.0100.00615.16
7.2.160.0000.01214.99
7.2.150.0000.01717.12
7.2.140.0070.01117.07
7.2.130.0100.00317.03
7.2.120.0080.00417.06
7.2.110.0030.00917.08
7.2.100.0030.01217.20
7.2.90.0030.01017.19
7.2.80.0100.01016.99
7.2.70.0120.00316.91
7.2.60.0030.00617.11
7.2.50.0040.01216.99
7.2.40.0070.00716.94
7.2.30.0120.00616.99
7.2.20.0030.01017.09
7.2.10.0060.00317.11
7.2.00.0020.01218.40
7.1.330.0000.01515.66
7.1.320.0070.00716.04
7.1.310.0070.00716.22
7.1.300.0070.01016.07
7.1.290.0060.00616.00
7.1.280.0030.01016.11
7.1.270.0040.00715.97
7.1.260.0030.01015.81
7.1.250.0030.01215.88
7.1.240.0080.00815.77
7.1.230.0060.01015.73
7.1.220.0030.00915.78
7.1.210.0070.00716.00
7.1.200.0100.00616.03
7.1.190.0030.01416.00
7.1.180.0060.00616.07
7.1.170.0040.00715.83
7.1.160.0070.00715.75
7.1.150.0100.00715.64
7.1.140.0000.01316.11
7.1.130.0000.00916.09
7.1.120.0060.00616.13
7.1.110.0040.01116.07
7.1.100.0050.00617.17
7.1.90.0080.00316.05
7.1.80.0110.00315.71
7.1.70.0060.00516.62
7.1.60.0080.01017.79
7.1.50.0090.00816.57
7.1.40.0050.00516.08
7.1.30.0060.00615.96
7.1.20.0030.00715.78
7.1.10.0060.00316.13
7.1.00.0000.04519.12
7.0.330.0070.00715.39
7.0.320.0030.01015.60
7.0.310.0000.01715.26
7.0.300.0060.00915.19
7.0.290.0000.01615.53
7.0.280.0040.01415.27
7.0.270.0080.00415.36
7.0.260.0040.00415.23
7.0.250.0080.00415.50
7.0.240.0060.00915.75
7.0.230.0130.00015.42
7.0.220.0080.00015.59
7.0.210.0000.01215.74
7.0.200.0050.00716.18
7.0.190.0030.00615.37
7.0.180.0070.00715.64
7.0.170.0030.00715.57
7.0.160.0040.00415.59
7.0.150.0000.01515.68
7.0.140.0070.03718.82
7.0.130.0070.00715.78
7.0.120.0070.00715.64
7.0.110.0050.03917.72
7.0.100.0110.04017.87
7.0.90.0100.04217.62
7.0.80.0030.04717.73
7.0.70.0070.04417.72
7.0.60.0100.03717.73
7.0.50.0030.04618.05
7.0.40.0100.04116.70
7.0.30.0050.05016.84
7.0.20.0050.04216.81
7.0.10.0120.04216.89
7.0.00.0030.04816.83
5.6.400.0000.01114.36
5.6.390.0040.01114.59
5.6.380.0000.01014.47
5.6.370.0040.01414.42
5.6.360.0030.00814.61
5.6.350.0070.01014.76
5.6.340.0090.00914.35
5.6.330.0100.00314.39
5.6.320.0070.00714.30
5.6.310.0100.00714.60
5.6.300.0030.00614.56
5.6.290.0040.00414.63
5.6.280.0050.04017.69
5.6.270.0090.00614.71
5.6.260.0100.03717.54
5.6.250.0060.04417.60
5.6.240.0080.03817.49
5.6.230.0080.03617.56
5.6.220.0050.04717.51
5.6.210.0080.03317.64
5.6.200.0030.04917.93
5.6.190.0040.04617.67
5.6.180.0080.04318.06
5.6.170.0100.04217.92
5.6.160.0070.04117.81
5.6.150.0080.02517.87
5.6.140.0070.04517.92
5.6.130.0140.03817.77
5.6.120.0070.04017.78
5.6.110.0080.02017.82
5.6.100.0090.04117.79
5.6.90.0020.05017.68
5.6.80.0050.04317.40
5.6.70.0070.04317.50
5.6.60.0100.04017.37
5.6.50.0080.03017.36
5.6.40.0070.04317.42
5.6.30.0100.03417.40
5.6.20.0050.04017.43
5.6.10.0070.04017.58
5.6.00.0070.02717.54
5.5.380.0060.04417.36
5.5.370.0080.02317.50
5.5.360.0060.04417.46
5.5.350.0090.04217.32
5.5.340.0090.04117.66
5.5.330.0070.04217.57
5.5.320.0020.05017.42
5.5.310.0070.04417.60
5.5.300.0050.02317.50
5.5.290.0080.04317.68
5.5.280.0100.03817.65
5.5.270.0030.04717.53
5.5.260.0100.04217.51
5.5.250.0020.04817.50
5.5.240.0030.02217.26
5.5.230.0080.04117.15
5.5.220.0060.02217.19
5.5.210.0130.03817.40
5.5.200.0020.04617.15
5.5.190.0110.03917.19
5.5.180.0060.04117.14
5.5.170.0030.01014.27
5.5.160.0050.04817.32
5.5.150.0070.03817.17
5.5.140.0080.03517.15
5.5.130.0080.03817.17
5.5.120.0030.04717.38
5.5.110.0070.03917.25
5.5.100.0080.02617.32
5.5.90.0050.03317.21
5.5.80.0030.03017.19
5.5.70.0020.02417.29
5.5.60.0030.02317.29
5.5.50.0050.02717.22
5.5.40.0080.02017.18
5.5.30.0070.02017.23
5.5.20.0030.02917.28
5.5.10.0080.02017.19
5.5.00.0000.02717.26
5.4.450.0030.04215.45
5.4.440.0000.04615.31
5.4.430.0030.04315.33
5.4.420.0080.04015.31
5.4.410.0060.04315.33
5.4.400.0050.04015.16
5.4.390.0030.04215.25
5.4.380.0050.03015.28
5.4.370.0100.03215.16
5.4.360.0060.04015.15
5.4.350.0090.04115.24
5.4.340.0080.03815.15
5.4.330.0070.00311.31
5.4.320.0070.04015.27
5.4.310.0060.02715.31
5.4.300.0030.03115.27
5.4.290.0030.04115.26
5.4.280.0030.04315.31
5.4.270.0040.04015.22
5.4.260.0100.03115.36
5.4.250.0100.02215.16
5.4.240.0080.03015.15
5.4.230.0050.02315.27
5.4.220.0030.02515.14
5.4.210.0030.02415.17
5.4.200.0030.02815.15
5.4.190.0020.02215.15
5.4.180.0030.02315.22
5.4.170.0050.01815.16
5.4.160.0050.02215.25
5.4.150.0070.01815.30
5.4.140.0050.03713.81
5.4.130.0060.03113.84
5.4.120.0020.03813.90
5.4.110.0070.03713.82
5.4.100.0030.02313.91
5.4.90.0020.03813.81
5.4.80.0070.03113.86
5.4.70.0040.02613.88
5.4.60.0030.04313.96
5.4.50.0060.02413.97
5.4.40.0020.03913.88
5.4.30.0020.02313.92
5.4.20.0020.02513.92
5.4.10.0000.02713.81
5.4.00.0010.02313.53
5.3.290.0080.03212.99
5.3.280.0080.02313.02
5.3.270.0060.02812.95
5.3.260.0060.02312.95
5.3.250.0050.02313.01
5.3.240.0020.02612.88
5.3.230.0000.02612.88
5.3.220.0070.03412.93
5.3.210.0040.03712.95
5.3.200.0090.02213.00
5.3.190.0030.04312.94
5.3.180.0060.04112.98
5.3.170.0030.02013.01
5.3.160.0080.03813.00
5.3.150.0080.03312.95
5.3.140.0050.02512.95
5.3.130.0070.03912.92
5.3.120.0070.03512.93
5.3.110.0080.03012.99
5.3.100.0030.02312.68
5.3.90.0030.02012.67
5.3.80.0030.02212.66
5.3.70.0050.02712.70
5.3.60.0090.03512.72
5.3.50.0070.03312.64
5.3.40.0030.02212.64
5.3.30.0070.03212.64
5.3.20.0030.02812.49
5.3.10.0020.03612.46
5.3.00.0030.01912.49
5.2.170.0070.06312.02
5.2.160.0030.03312.02
5.2.150.0030.03312.02
5.2.140.0000.03012.02
5.2.130.0100.02012.02
5.2.120.0000.03712.02
5.2.110.0070.02312.02
5.2.100.0030.04012.02
5.2.90.0070.04312.02
5.2.80.0070.02312.02
5.2.70.0100.02012.02
5.2.60.0000.03012.02
5.2.50.0070.02312.02
5.2.40.0000.03012.02
5.2.30.0030.03312.02
5.2.20.0000.04712.02
5.2.10.0030.02712.02
5.2.00.0030.03012.02
5.1.60.0070.02012.02
5.1.50.0000.02712.02
5.1.40.0030.02312.02
5.1.30.0030.02312.02
5.1.20.0030.02312.02
5.1.10.0000.02712.02
5.1.00.0030.02012.02
5.0.50.0070.01712.02
5.0.40.0000.02012.02
5.0.30.0000.03012.02
5.0.20.0000.01712.02
5.0.10.0000.03312.02
5.0.00.0000.04312.02
4.4.90.0000.01712.02
4.4.80.0000.01712.02
4.4.70.0000.01312.02
4.4.60.0000.02012.02
4.4.50.0000.01312.02
4.4.40.0000.03012.02
4.4.30.0000.01712.02
4.4.20.0000.02712.02
4.4.10.0000.02312.02
4.4.00.0030.02312.02
4.3.110.0030.02712.02
4.3.100.0030.02012.02
4.3.90.0030.01312.02
4.3.80.0000.02312.02
4.3.70.0000.02312.02
4.3.60.0000.01312.02
4.3.50.0030.03012.02
4.3.40.0000.05012.02
4.3.30.0000.03012.02
4.3.20.0000.03712.02
4.3.10.0070.03312.02
4.3.00.0030.03312.02

preferences:
54.13 ms | 401 KiB | 5 Q