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 = 'n/a-n/a'; $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] . '-' . $age_range_arr[1]; } 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.60.0100.00716.63
8.3.50.0050.01222.10
8.3.40.0150.00619.09
8.3.30.0090.00619.06
8.3.20.0040.00420.34
8.3.10.0040.00423.51
8.3.00.0030.00717.63
8.2.180.0040.01516.88
8.2.170.0100.00722.96
8.2.160.0070.01020.47
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0070.00022.11
8.2.110.0030.00722.11
8.2.100.0110.00019.76
8.2.90.0040.00419.30
8.2.80.0050.00317.97
8.2.70.0080.00317.74
8.2.60.0080.00018.05
8.2.50.0050.00318.07
8.2.40.0060.00318.34
8.2.30.0060.00318.15
8.2.20.0080.00017.89
8.2.10.0040.00418.11
8.2.00.0040.00417.94
8.1.280.0100.00725.92
8.1.270.0130.00623.89
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0130.01023.90
8.1.230.0110.00019.02
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0040.00717.48
8.1.190.0040.00417.38
8.1.180.0030.00618.10
8.1.170.0030.00618.59
8.1.160.0000.00721.87
8.1.150.0040.00418.64
8.1.140.0050.00217.59
8.1.130.0070.00017.74
8.1.120.0050.00217.50
8.1.110.0030.00517.50
8.1.100.0050.00217.57
8.1.90.0040.00417.58
8.1.80.0030.00317.52
8.1.70.0000.00717.49
8.1.60.0030.00517.62
8.1.50.0040.00417.56
8.1.40.0050.00217.66
8.1.30.0040.00417.55
8.1.20.0040.00417.78
8.1.10.0040.00417.61
8.1.00.0040.00417.71
8.0.300.0040.00418.77
8.0.290.0000.00717.30
8.0.280.0030.00318.46
8.0.270.0040.00417.33
8.0.260.0080.00017.21
8.0.250.0000.00717.04
8.0.240.0090.00017.13
8.0.230.0000.00617.01
8.0.220.0000.00716.92
8.0.210.0030.00316.95
8.0.200.0040.00417.06
8.0.190.0030.00617.02
8.0.180.0000.00717.10
8.0.170.0040.00417.02
8.0.160.0040.00417.03
8.0.150.0040.00417.04
8.0.140.0040.00416.99
8.0.130.0000.00613.36
8.0.120.0030.00516.96
8.0.110.0000.00717.08
8.0.100.0030.00616.82
8.0.90.0040.00417.02
8.0.80.0070.01517.00
8.0.70.0030.00516.94
8.0.60.0000.00717.15
8.0.50.0040.00416.93
8.0.30.0120.00617.24
8.0.20.0120.00917.40
8.0.10.0020.00517.21
8.0.00.0100.01017.07
7.4.330.0030.00315.20
7.4.320.0030.00316.65
7.4.300.0030.00316.67
7.4.290.0000.00716.75
7.4.280.0030.00316.56
7.4.270.0030.00316.67
7.4.260.0040.00416.72
7.4.250.0040.00416.61
7.4.240.0020.00516.75
7.4.230.0000.00716.64
7.4.220.0060.02016.73
7.4.210.0060.01116.68
7.4.200.0030.00316.84
7.4.190.0000.00816.81
7.4.160.0100.00516.66
7.4.150.0110.00517.40
7.4.140.0100.00717.86
7.4.130.0080.01216.57
7.4.120.0090.00916.59
7.4.110.0090.00916.75
7.4.100.0080.00816.66
7.4.90.0070.01116.66
7.4.80.0150.01419.39
7.4.70.0090.00916.68
7.4.60.0000.01616.55
7.4.50.0050.00016.76
7.4.40.0080.00816.71
7.4.30.0100.00616.70
7.4.00.0070.00715.16
7.3.330.0000.00513.38
7.3.320.0050.00013.35
7.3.310.0030.00416.43
7.3.300.0000.00716.39
7.3.290.0030.01416.37
7.3.280.0130.00716.40
7.3.270.0080.00817.40
7.3.260.0030.01416.67
7.3.250.0100.01116.48
7.3.240.0130.00716.27
7.3.230.0100.00716.65
7.3.210.0070.01016.52
7.3.200.0120.01219.39
7.3.190.0130.00316.80
7.3.180.0070.01016.39
7.3.170.0060.00916.61
7.3.160.0120.00316.70
7.3.120.0000.01615.01
7.3.00.0000.01516.72
7.2.330.0100.00716.78
7.2.320.0150.00616.86
7.2.310.0130.00416.99
7.2.300.0040.01216.78
7.2.290.0190.00316.66
7.2.130.0100.00317.04
7.2.120.0080.00316.93
7.2.110.0030.00716.78
7.2.100.0060.00617.01
7.2.90.0060.00916.82
7.2.80.0100.00317.25
7.2.70.0040.01117.07
7.2.60.0000.01117.17
7.2.50.0090.00016.91
7.2.40.0080.00616.85
7.2.30.0000.00917.05
7.2.20.0040.01116.98
7.2.10.0040.01417.11
7.2.00.0050.00718.30
7.1.250.0110.00415.94
7.1.240.0060.00615.61
7.1.230.0100.00315.72
7.1.220.0090.00315.67
7.1.210.0000.01315.78
7.1.200.0070.00415.80
7.1.190.0100.00315.78
7.1.180.0070.00715.70
7.1.170.0030.00516.03
7.1.160.0030.00915.90
7.1.150.0040.01115.75
7.1.140.0040.00415.75
7.1.130.0040.01115.95
7.1.120.0080.00415.94
7.1.110.0030.00915.73
7.1.100.0160.00417.02
7.1.90.0080.00315.80
7.1.80.0030.00915.71
7.1.70.0020.01116.60
7.1.60.0100.00717.71
7.1.50.0070.01216.48
7.1.40.0000.01215.88
7.1.30.0090.00615.71
7.1.20.0030.01015.97
7.1.10.0030.01215.71
7.1.00.0030.04319.10
7.0.330.0030.01315.42
7.0.320.0040.00715.48
7.0.310.0060.00315.55
7.0.300.0070.00715.54
7.0.290.0070.00315.39
7.0.280.0060.01015.39
7.0.270.0060.00615.66
7.0.260.0080.00315.32
7.0.250.0110.00015.68
7.0.240.0070.00715.63
7.0.230.0030.01015.49
7.0.220.0000.01415.49
7.0.210.0030.00915.54
7.0.200.0070.00316.23
7.0.190.0050.00515.34
7.0.180.0070.00615.58
7.0.170.0030.01015.79
7.0.160.0050.00515.35
7.0.150.0060.00315.62
7.0.140.0080.03518.90
7.0.130.0030.01015.74
7.0.120.0070.00715.58
7.0.110.0060.00315.64
7.0.100.0060.00615.50
7.0.90.0030.01015.44
7.0.80.0060.00615.30
7.0.70.0030.01115.49
7.0.60.0050.04417.75
7.0.50.0040.02216.81
7.0.40.0070.04516.78
7.0.30.0130.03816.83
7.0.20.0080.02716.86
7.0.10.0110.04316.79
7.0.00.0050.02916.82
5.6.380.0060.00614.36
5.6.370.0060.00614.48
5.6.360.0060.01014.41
5.6.350.0080.00414.46
5.6.340.0000.01114.71
5.6.330.0090.00614.35
5.6.320.0090.00014.59
5.6.310.0030.00614.51
5.6.300.0040.01114.42
5.6.290.0060.00614.26
5.6.280.0030.00714.50
5.6.270.0060.00914.16
5.6.260.0080.00614.45
5.6.250.0040.00814.51
5.6.240.0030.00614.21
5.6.230.0070.00714.33
5.6.220.0030.01314.35
5.6.210.0030.02517.52
5.6.200.0080.04516.33
5.6.190.0030.03917.43
5.6.180.0230.04017.56
5.6.170.0200.03617.42
5.6.160.0110.03317.51
5.6.150.0090.03816.25
5.6.140.0050.02416.32
5.6.130.0050.05016.23
5.6.120.0030.02517.68
5.6.110.0130.04117.76
5.6.100.0050.04517.71
5.6.90.0020.02717.60
5.6.80.0170.03317.37
5.6.70.0030.01014.28
5.6.60.0030.00914.75
5.6.50.0060.00914.50
5.6.40.0060.01014.32
5.6.30.0040.01214.44
5.6.20.0090.00014.37
5.6.10.0000.01414.60
5.6.00.0100.00014.59
5.5.380.0070.00311.18
5.5.370.0000.01211.18
5.5.360.0000.01211.18
5.5.350.0170.03016.00
5.5.340.0070.02514.61
5.5.330.0040.02715.79
5.5.320.0120.03215.86
5.5.310.0180.03515.83
5.5.300.0050.02214.61
5.5.290.0030.03614.61
5.5.280.0030.04716.14
5.5.270.0070.04616.11
5.5.260.0090.04016.09
5.5.250.0050.02915.90
5.5.240.0020.02015.88
5.5.230.0080.00311.26
5.5.220.0000.00611.18
5.5.210.0030.00611.46
5.5.200.0000.00711.41
5.5.190.0040.00811.32
5.5.180.0060.00611.44
5.5.170.0030.00611.38
5.5.160.0050.00311.35
5.5.150.0030.00511.39
5.5.140.0030.00611.36
5.5.130.0060.00311.18
5.5.120.0090.00011.23
5.5.110.0000.01011.18
5.5.100.0100.00311.18
5.5.90.0000.00611.18
5.5.80.0030.01011.26
5.5.70.0060.00611.18
5.5.60.0000.00811.18
5.5.50.0000.00611.39
5.5.40.0000.01411.18
5.5.30.0030.00911.51
5.5.20.0030.00311.42
5.5.10.0050.00511.18
5.5.00.0110.00311.18
5.4.450.0090.02015.24
5.4.440.0130.03115.33
5.4.430.0160.01815.32
5.4.420.0430.02115.37
5.4.410.0150.02515.12
5.4.400.0180.02315.24
5.4.390.0400.02215.28
5.4.380.0230.03514.88
5.4.370.0150.03214.89
5.4.360.0180.02815.01
5.4.350.0100.03814.98
5.4.340.0280.04015.07
5.4.330.0070.00411.34
5.4.320.0040.02411.87
5.4.310.0100.02511.84
5.4.300.0040.02011.84
5.4.290.0070.02411.84
5.4.280.0070.01911.79
5.4.270.0070.01911.79
5.4.260.0040.02211.79
5.4.250.0060.02111.79
5.4.240.0040.02111.79
5.4.230.0050.02311.78
5.4.220.0050.02111.82
5.4.210.0050.02211.82
5.4.200.0050.02111.79
5.4.190.0070.02711.78
5.4.180.0080.02211.78
5.4.170.0080.01811.79
5.4.160.0050.02211.81
5.4.150.0030.02511.82
5.4.140.0020.02511.67
5.4.130.0030.02411.62
5.4.120.0040.02411.60
5.4.110.0070.02311.60
5.4.100.0040.02211.66
5.4.90.0020.03211.59
5.4.80.0040.02211.59
5.4.70.0060.02511.65
5.4.60.0030.02611.69
5.4.50.0040.02611.64
5.4.40.0040.02711.64
5.4.30.0070.02411.59
5.4.20.0070.02411.61
5.4.10.0040.02411.58
5.4.00.0030.02611.33
5.3.290.0060.02211.99
5.3.280.0070.02111.94
5.3.270.0040.02511.95
5.3.260.0070.02111.95
5.3.250.0050.02411.95
5.3.240.0080.02111.95
5.3.230.0090.02111.94
5.3.220.0030.02411.93
5.3.210.0040.02611.93
5.3.200.0050.02111.93
5.3.190.0050.02311.93
5.3.180.0080.02611.93
5.3.170.0070.02911.92
5.3.160.0050.02911.92
5.3.150.0130.03611.93
5.3.140.0080.04411.92
5.3.130.0080.02911.91
5.3.120.0060.03211.92
5.3.110.0060.03911.92
5.3.100.0040.02911.65
5.3.90.0050.03711.64
5.3.80.0060.03111.63
5.3.70.0060.03011.63
5.3.60.0040.03311.63
5.3.50.0060.02311.60
5.3.40.0050.03911.60
5.3.30.0050.03111.58
5.3.20.0060.02811.47
5.3.10.0040.02511.45
5.3.00.0070.02211.45
5.2.170.0050.02010.20
5.2.160.0020.02010.20
5.2.150.0050.02310.20
5.2.140.0080.02110.20
5.2.130.0050.02610.18
5.2.120.0050.04310.18
5.2.110.0090.04010.18
5.2.100.0110.03310.18
5.2.90.0070.02910.18
5.2.80.0030.01810.18
5.2.70.0050.01710.18
5.2.60.0040.01910.15
5.2.50.0050.02410.14
5.2.40.0040.02310.13
5.2.30.0040.02510.11
5.2.20.0050.01810.11
5.2.10.0070.01810.06
5.2.00.0050.0239.99
5.1.60.0050.0249.63
5.1.50.0040.0199.63
5.1.40.0020.0219.62
5.1.30.0040.0149.80
5.1.20.0060.0149.81
5.1.10.0030.0179.67
5.1.00.0040.0159.67
5.0.50.0040.0108.92
5.0.40.0060.0108.85
5.0.30.0030.0208.75
5.0.20.0030.0128.74
5.0.10.0030.0168.72
5.0.00.0040.0198.72
4.4.90.0010.0127.97
4.4.80.0030.0107.96
4.4.70.0020.0107.97
4.4.60.0010.0107.97
4.4.50.0020.0107.97
4.4.40.0010.0157.94
4.4.30.0030.0107.97
4.4.20.0020.0118.01
4.4.10.0030.0088.01
4.4.00.0050.0147.97
4.3.110.0010.0117.92
4.3.100.0030.0137.92
4.3.90.0030.0137.90
4.3.80.0020.0157.88
4.3.70.0040.0097.90
4.3.60.0020.0097.90
4.3.50.0030.0097.90
4.3.40.0030.0147.86
4.3.30.0020.0107.24
4.3.20.0010.0127.23
4.3.10.0020.0117.21
4.3.00.0030.01013.61

preferences:
47.01 ms | 400 KiB | 5 Q