3v4l.org

run code in 300+ PHP versions simultaneously
<?php //create both dates (birthday and today). $birthday = date_create($this->birthday); $today = date_create(date('Y-m-d')); //check if the dates are valid. if (($birthday !== false && $today !== false) && ($birthday < $today)) { return date_diff($birthday, $today)->y; } else { return -1; }

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.0150.00616.63
8.3.50.0140.00921.10
8.3.40.0090.00618.60
8.3.30.0090.00618.55
8.3.20.0000.00720.16
8.3.10.0000.00823.48
8.3.00.0000.00723.51
8.2.180.0070.01325.92
8.2.170.0160.00019.00
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00819.77
8.2.120.0040.00426.35
8.2.110.0080.00419.34
8.2.100.0030.00917.80
8.2.90.0030.00519.23
8.2.80.0000.00818.03
8.2.70.0090.00017.61
8.2.60.0080.00017.93
8.2.50.0030.00618.07
8.2.40.0030.00620.41
8.2.30.0000.00719.29
8.2.20.0000.00817.55
8.2.10.0020.00517.90
8.2.00.0060.00317.88
8.1.280.0110.00425.92
8.1.270.0040.00424.66
8.1.260.0050.00328.09
8.1.250.0000.00728.09
8.1.240.0100.00023.99
8.1.230.0040.00719.25
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0050.00517.25
8.1.190.0030.00617.00
8.1.180.0040.00418.10
8.1.170.0000.00818.50
8.1.160.0000.00720.57
8.1.150.0000.00818.63
8.1.140.0050.00319.44
8.1.130.0030.00317.46
8.1.120.0050.00217.38
8.1.110.0000.00717.21
8.1.100.0000.00717.18
8.1.90.0000.00717.36
8.1.80.0050.00317.40
8.1.70.0080.00017.16
8.1.60.0040.00417.29
8.1.50.0000.00817.45
8.1.40.0040.00417.44
8.1.30.0060.00317.52
8.1.20.0070.00417.52
8.1.10.0070.00017.54
8.1.00.0000.00817.43
8.0.300.0070.00018.77
8.0.290.0030.00616.75
8.0.280.0030.00318.38
8.0.270.0030.00317.20
8.0.260.0000.00617.19
8.0.250.0000.00616.82
8.0.240.0040.00416.99
8.0.230.0000.00816.90
8.0.220.0030.00616.86
8.0.210.0000.00816.93
8.0.200.0030.00316.96
8.0.190.0000.00816.98
8.0.180.0030.00316.86
8.0.170.0050.00316.80
8.0.160.0000.00716.80
8.0.150.0030.00516.84
8.0.140.0080.00016.85
8.0.130.0000.00613.40
8.0.120.0060.00316.87
8.0.110.0080.00016.88
8.0.100.0070.00016.85
8.0.90.0030.00316.77
8.0.80.0060.00916.87
8.0.70.0050.00216.79
8.0.60.0040.00416.73
8.0.50.0040.00416.89
8.0.30.0150.00416.96
8.0.20.0100.00817.40
8.0.10.0040.00416.82
8.0.00.0080.01116.68
7.4.330.0000.00516.84
7.4.320.0060.00016.37
7.4.300.0030.00316.43
7.4.290.0000.00816.54
7.4.280.0060.00316.52
7.4.270.0000.00716.51
7.4.260.0080.00016.41
7.4.250.0030.00316.38
7.4.240.0040.00316.38
7.4.230.0030.00316.52
7.4.220.0070.01116.53
7.4.210.0080.00616.55
7.4.200.0030.00316.44
7.4.160.0170.00016.62
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0130.00816.30
7.4.120.0130.00416.51
7.4.110.0140.00316.47
7.4.100.0090.01216.43
7.4.90.0110.00716.50
7.4.80.0180.00719.39
7.4.70.0090.00916.43
7.4.60.0080.00816.48
7.4.50.0060.00616.17
7.4.40.0030.01616.48
7.4.30.0140.00716.57
7.4.00.0080.00714.96
7.3.330.0050.00013.18
7.3.320.0070.00013.06
7.3.310.0000.00716.39
7.3.300.0000.00616.25
7.3.290.0060.00016.25
7.3.280.0100.00716.26
7.3.270.0060.01217.40
7.3.260.0090.00916.48
7.3.250.0070.01116.37
7.3.240.0130.00416.54
7.3.230.0150.00716.39
7.3.210.0140.00316.43
7.3.200.0110.00619.39
7.3.190.0110.00816.34
7.3.180.0080.00816.30
7.3.170.0120.00416.50
7.3.160.0040.01116.26
7.3.120.0100.00714.85
7.3.110.0040.01214.82
7.3.100.0000.01514.69
7.3.90.0050.00514.74
7.3.80.0000.01114.77
7.3.70.0000.00814.82
7.3.60.0040.01114.76
7.3.50.0100.00314.84
7.3.40.0080.00814.64
7.3.30.0030.00714.24
7.3.20.0120.00316.45
7.3.10.0130.00316.36
7.3.00.0000.01716.72
7.2.330.0140.00416.48
7.2.320.0100.00616.66
7.2.310.0150.00916.57
7.2.300.0100.00616.36
7.2.290.0030.01616.68
7.2.250.0030.01515.19
7.2.240.0040.01415.02
7.2.230.0070.00714.58
7.2.220.0060.00915.10
7.2.210.0030.01215.20
7.2.200.0060.00614.99
7.2.190.0030.00615.07
7.2.180.0000.01214.62
7.2.170.0040.01114.97
7.2.60.0130.00016.90
7.2.00.0060.00619.20
7.1.330.0060.00615.44
7.1.320.0000.01315.68
7.1.310.0070.00715.53
7.1.300.0080.00415.52
7.1.290.0030.01015.36
7.1.280.0090.00015.73
7.1.270.0000.01015.61
7.1.260.0040.01115.71
7.1.200.0080.00415.58
7.1.100.0060.00618.23
7.1.70.0030.00317.07
7.1.60.0110.01119.30
7.1.50.0100.01016.91
7.1.00.0070.07322.44
7.0.200.0000.00816.72
7.0.100.0000.08320.02
7.0.90.0070.08719.92
7.0.80.0100.03719.91
7.0.70.0030.11319.87
7.0.60.0070.06019.92
7.0.50.0070.04720.33
7.0.40.0070.08720.18
7.0.30.0070.06720.14
7.0.20.0100.05020.18
7.0.10.0300.07020.08
7.0.00.0200.06320.08
5.6.280.0100.06721.10
5.6.250.0170.07320.66
5.6.240.0000.04720.59
5.6.230.0070.04720.63
5.6.220.0200.07020.55
5.6.210.0070.03720.49
5.6.200.0030.05021.17
5.6.190.0030.04321.10
5.6.180.0030.09021.00
5.6.170.0100.08321.03
5.6.160.0100.05721.03
5.6.150.0030.08720.94
5.6.140.0100.05021.08
5.6.130.0100.04021.07
5.6.120.0030.05721.13
5.6.110.0070.09021.02
5.6.100.0070.06020.93
5.6.90.0030.08020.92
5.6.80.0100.06020.44
5.6.70.0130.04720.41
5.6.60.0170.06320.54
5.6.50.0030.08320.43
5.6.40.0130.07020.29
5.6.30.0030.04720.46
5.6.20.0100.05720.41
5.6.10.0070.07020.52
5.6.00.0130.07320.36
5.5.380.0070.04020.39
5.5.370.0100.08020.41
5.5.360.0100.08020.52
5.5.350.0030.03720.33
5.5.340.0100.07720.89
5.5.330.0100.07720.82
5.5.320.0130.08020.76
5.5.310.0200.06720.90
5.5.300.0070.08320.73
5.5.290.0070.04320.82
5.5.280.0100.06020.87
5.5.270.0030.09020.83
5.5.260.0070.07720.67
5.5.250.0130.07320.67
5.5.240.0130.06720.27
5.5.230.0030.04020.21
5.5.220.0070.08020.20
5.5.210.0130.06319.99
5.5.200.0100.04320.20
5.5.190.0100.06320.20
5.5.180.0000.05320.23
5.5.160.0170.06720.25
5.5.150.0070.06720.20
5.5.140.0000.05320.11
5.5.130.0070.07720.21
5.5.120.0070.07320.23
5.5.110.0030.08019.98
5.5.100.0100.04320.16
5.5.90.0070.08020.15
5.5.80.0170.07320.14
5.5.70.0000.05320.15
5.5.60.0000.05020.05
5.5.50.0070.04720.05
5.5.40.0100.03720.05
5.5.30.0070.08320.07
5.5.20.0170.06720.08
5.5.10.0100.04019.97
5.5.00.0100.07320.09

preferences:
49.88 ms | 401 KiB | 5 Q