3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = 1999; $month = 2; $day = 6; $birthday = $month.$day.$year; // validate birthday function validateAge($birthday, $age = 25) { // $birthday can be UNIX_TIMESTAMP or just a string-date. if(is_string($birthday)) { $birthday = strtotime($birthday); echo "OLDER THAN 25!!!"; } // check // 31536000 is the number of seconds in a 365 days year. if(time() - $birthday < $age * 31536000) { echo "NOT OLDER THAN 25!!!"; return false; } return true; }

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)
7.4.00.0060.01414.80
7.3.120.0100.01014.70
7.3.110.0070.01014.60
7.3.100.0030.01014.67
7.3.90.0070.01114.68
7.3.80.0100.00614.87
7.3.70.0030.01014.74
7.3.60.0000.01314.50
7.3.50.0000.01514.49
7.3.40.0060.00614.62
7.3.30.0080.00814.67
7.3.20.0070.00716.59
7.3.10.0140.00016.32
7.3.00.0030.01016.63
7.2.250.0080.01114.77
7.2.240.0110.00714.85
7.2.230.0060.01015.09
7.2.220.0170.00014.78
7.2.210.0070.01115.16
7.2.200.0040.00814.93
7.2.190.0110.00414.61
7.2.180.0030.00614.94
7.2.170.0030.01014.70
7.2.80.0070.00716.57
7.2.60.0150.00616.91
7.2.50.0060.00916.79
7.1.330.0030.01015.85
7.1.320.0110.00715.76
7.1.310.0000.01015.71
7.1.300.0030.01015.68
7.1.290.0040.01115.54
7.1.280.0000.00915.76
7.1.270.0000.01015.67
7.1.260.0080.00015.85
7.1.200.0130.00315.07
7.1.110.0150.00318.21
7.1.100.0000.02018.20
7.1.90.0110.00617.77
7.1.80.0030.01318.01
7.1.70.0030.01416.73
7.1.60.0120.02335.14
7.1.50.0210.01334.40
7.1.40.0200.01334.18
7.1.30.0210.02034.27
7.1.20.0270.00634.60
7.1.10.0070.01016.30
7.1.00.0040.01116.45
7.0.250.0040.01417.84
7.0.240.0110.00817.88
7.0.230.0070.00717.55
7.0.220.0040.01117.43
7.0.210.0060.01416.44
7.0.200.0030.01216.64
7.0.190.0000.01416.77
7.0.180.0030.01316.22
7.0.170.0100.00616.25
7.0.160.0060.00916.07
7.0.150.0060.01016.22
7.0.140.0060.00916.45
7.0.130.0000.01916.42
7.0.120.0030.01316.36
7.0.110.0090.00916.30
7.0.100.0070.01316.39
7.0.90.0090.01216.32
7.0.80.0090.01216.33
7.0.70.0080.01216.24
7.0.60.0080.01316.03
7.0.50.0100.01016.33
7.0.40.0070.01016.44
7.0.30.0070.01416.57
7.0.20.0020.01516.24
7.0.10.0090.01116.55
7.0.00.0080.00916.35

preferences:
38.08 ms | 400 KiB | 5 Q