3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = strtotime('2010-04-28 17:25:43'); echo 'event happened '.humanTiming($time).' ago'; function humanTiming ($time) { $time = time() - $time; // to get the time since that moment $tokens = array ( 31536000 => 'year', 2592000 => 'month', 604800 => 'week', 86400 => 'day', 3600 => 'hour', 60 => 'minute', 1 => 'second'); foreach ($tokens as $unit => $text) { if ($time < $unit) continue; $numberOfUnits = floor($time / $unit); return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':''); } }

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.3.120.0100.00714.95
7.3.110.0070.01115.16
7.3.100.0040.01214.72
7.3.90.0130.00315.18
7.3.80.0080.00415.18
7.3.70.0100.00314.77
7.3.60.0050.00514.86
7.3.50.0040.01114.88
7.3.40.0040.01115.10
7.3.30.0090.00615.07
7.3.20.0060.00616.73
7.3.10.0080.00716.54
7.3.00.0090.00616.94
7.2.240.0030.01015.50
7.2.230.0040.01114.95
7.2.220.0030.01215.48
7.2.210.0080.00814.81
7.2.200.0060.00615.30
7.2.190.0110.00715.18
7.2.180.0040.00815.20
7.2.170.0040.00815.10
7.2.160.0060.00615.21
7.2.150.0070.00717.21
7.2.140.0070.01017.23
7.2.130.0040.00717.31
7.2.120.0090.00616.91
7.2.110.0110.00716.79
7.2.100.0060.00617.27
7.2.90.0100.00717.11
7.2.80.0030.00717.26
7.2.70.0060.01216.93
7.2.60.0110.00316.93
7.2.50.0060.00616.88
7.2.40.0030.00917.23
7.2.30.0040.01517.12
7.2.20.0110.00417.27
7.2.10.0030.01317.15
7.2.00.0000.01216.92
7.1.330.0040.00816.18
7.1.320.0060.00315.62
7.1.310.0110.00316.01
7.1.300.0100.00315.99
7.1.290.0070.00716.12
7.1.280.0100.00716.14
7.1.270.0120.00415.93
7.1.260.0040.00815.81
7.1.250.0040.01215.73
7.1.200.0070.00715.81
7.1.70.0040.00817.40
7.1.60.0120.00919.43
7.1.50.0100.01317.32
7.1.00.0000.06322.45
7.0.200.0000.00716.66
7.0.140.0000.08022.16
7.0.100.0100.08019.84
7.0.90.0070.08319.86
7.0.80.0100.07319.85
7.0.70.0100.05019.89
7.0.60.0070.08019.92
7.0.50.0130.07720.37
7.0.40.0130.07020.11
7.0.30.0130.08020.04
7.0.20.0070.05020.07
7.0.10.0030.06720.02
7.0.00.0030.08320.04
5.6.280.0030.07321.07
5.6.250.0130.08020.47
5.6.240.0100.08320.58
5.6.230.0170.07720.54
5.6.220.0030.08320.63
5.6.210.0070.05020.70
5.6.200.0200.04021.05
5.6.190.0000.09021.14
5.6.180.0100.07720.89
5.6.170.0100.07320.96
5.6.160.0170.07321.14
5.6.150.0070.08021.11
5.6.140.0100.07721.04
5.6.130.0170.07020.95
5.6.120.0070.07320.93
5.6.110.0030.07021.02
5.6.100.0030.06720.93
5.6.90.0030.06021.06
5.6.80.0130.07320.49
5.6.70.0070.08020.45
5.6.60.0030.08320.40
5.6.50.0030.08020.50
5.6.40.0130.07020.43
5.6.30.0100.06720.49
5.6.20.0130.07020.37
5.6.10.0100.05020.46
5.6.00.0100.05320.27
5.5.380.0100.07320.30
5.5.370.0100.07720.35
5.5.360.0030.08720.46
5.5.350.0100.07720.43
5.5.340.0070.08020.87
5.5.330.0130.07320.89
5.5.320.0130.08020.74
5.5.310.0130.06320.89
5.5.300.0000.08020.74
5.5.290.0100.08020.92
5.5.280.0030.08020.72
5.5.270.0130.07020.79
5.5.260.0030.06020.77
5.5.250.0070.08720.58
5.5.240.0030.08320.23
5.5.230.0030.08320.27
5.5.220.0030.07320.09
5.5.210.0030.08320.30
5.5.200.0000.05020.00
5.5.190.0070.08320.21
5.5.180.0130.05020.15
5.5.160.0130.04020.27
5.5.150.0030.05720.15
5.5.140.0130.07020.13
5.5.130.0130.06020.24
5.5.120.0100.05320.22
5.5.110.0070.07320.21
5.5.100.0000.08720.08
5.5.90.0130.06320.10
5.5.80.0100.04720.12
5.5.70.0070.07020.07
5.5.60.0100.05020.12
5.5.50.0100.07020.07
5.5.40.0100.07320.06
5.5.30.0100.05320.14
5.5.20.0100.07020.14
5.5.10.0030.05020.11
5.5.00.0070.08020.06
5.4.450.0100.07019.54
5.4.440.0070.07019.32
5.4.430.0070.04719.46
5.4.420.0130.03719.50
5.4.410.0030.05319.34
5.4.400.0100.07719.23
5.4.390.0070.06718.85
5.4.380.0070.04019.03
5.4.370.0100.07318.87
5.4.360.0130.05719.14
5.4.350.0170.06019.12
5.4.340.0070.08019.18
5.4.320.0130.06018.94
5.4.310.0030.07718.94
5.4.300.0070.04718.91
5.4.290.0030.04019.12
5.4.280.0030.05319.03
5.4.270.0100.06719.12
5.4.260.0070.07019.02
5.4.250.0030.05019.12
5.4.240.0000.08719.11
5.4.230.0100.05019.06
5.4.220.0100.06719.08
5.4.210.0100.07719.04
5.4.200.0030.04719.19
5.4.190.0000.06318.83
5.4.180.0100.06718.89
5.4.170.0070.06319.02
5.4.160.0030.04719.02
5.4.150.0030.06319.14
5.4.140.0030.07716.50
5.4.130.0030.06716.42
5.4.120.0000.04016.41
5.4.110.0070.07316.44
5.4.100.0200.05016.55
5.4.90.0130.06716.54
5.4.80.0100.07016.39
5.4.70.0130.06016.49
5.4.60.0100.05016.31
5.4.50.0030.07316.41
5.4.40.0000.08016.46
5.4.30.0030.07716.29
5.4.20.0100.06716.41
5.4.10.0100.07016.23
5.4.00.0070.06715.80
5.3.290.0100.07714.77
5.3.280.0030.08014.52
5.3.270.0070.04314.53
5.3.260.0070.06714.59
5.3.250.0100.06714.55
5.3.240.0030.07314.63
5.3.230.0030.06714.57
5.3.220.0100.04014.56
5.3.210.0070.03714.62
5.3.200.0000.06714.63
5.3.190.0070.07714.56
5.3.180.0070.05714.59
5.3.170.0070.07714.64
5.3.160.0170.05014.53
5.3.150.0030.08014.56
5.3.140.0070.07314.58
5.3.130.0070.07314.48
5.3.120.0030.07314.52
5.3.110.0030.05714.47
5.3.100.0030.08014.14
5.3.90.0070.05314.00
5.3.80.0030.05314.08
5.3.70.0000.05713.95
5.3.60.0070.07713.90
5.3.50.0070.07313.96
5.3.40.0100.05014.00
5.3.30.0030.03713.89
5.3.20.0130.05713.67
5.3.10.0070.04013.77
5.3.00.0030.07713.54
5.2.170.0130.05311.79
5.2.160.0030.05711.79
5.2.150.0030.03711.79
5.2.140.0100.05711.79
5.2.130.0070.05711.79
5.2.120.0030.04011.79
5.2.110.0030.03011.79
5.2.100.0130.06011.79
5.2.90.0070.06011.79
5.2.80.0070.05311.79
5.2.70.0030.07011.79
5.2.60.0070.06311.79
5.2.50.0030.05311.79
5.2.40.0100.05011.79
5.2.30.0130.05711.79
5.2.20.0070.05311.79
5.2.10.0030.04011.79
5.2.00.0100.06011.79
5.1.60.0030.03011.79
5.1.50.0100.04011.79
5.1.40.0030.04711.79
5.1.30.0030.03311.79
5.1.20.0100.04311.79
5.1.10.0030.04011.79
5.1.00.0100.02011.79
5.0.50.0030.04711.79
5.0.40.0000.03011.79
5.0.30.0130.05711.79
5.0.20.0030.02311.79
5.0.10.0030.04711.79
5.0.00.0000.06711.79
4.4.90.0000.03711.79
4.4.80.0030.03311.79
4.4.70.0000.03311.79
4.4.60.0000.04011.79
4.4.50.0030.02311.79
4.4.40.0030.02711.79
4.4.30.0000.02711.79
4.4.20.0070.02011.79
4.4.10.0000.03711.79
4.4.00.0000.05311.79
4.3.110.0000.02311.79
4.3.100.0030.02011.79
4.3.90.0030.03311.79
4.3.80.0000.05311.79
4.3.70.0070.02711.79
4.3.60.0030.01311.79
4.3.50.0070.01311.79
4.3.40.0070.04711.79
4.3.30.0000.01711.79
4.3.20.0030.03711.79
4.3.10.0030.03311.79
4.3.00.0000.02711.79

preferences:
35.85 ms | 400 KiB | 5 Q