3v4l.org

run code in 300+ PHP versions simultaneously
<?php function update_ipdb() { // check if we can update the database //global $pcm_localization; //$last_update = get_option( 'pcm_last_ipdb_update', '0|N/A' ); //$last_update = explode( '|', $last_update ); $last_update = '1445519411'; $last_month = strtotime( 'first wednesday of last month' ); $this_month = strtotime( 'first wednesday of this month' ); $today = time(); $recent_wed = $today > $this_month ? $this_month : $last_month; // identify most recent first wednesday (the nearest first wednesday in the past) /* Only Update if the following criteria are met: * 1. Current time is in the future of recent_wed and Last Update is not * 2. Auto Update is enabled */ if ( $today > $recent_wed && $last_update < $recent_wed && $this->options->general->geolocation->enable_auto_db_update ) { $ok = true; // check if all went well if ( $ok ) { echo 'yep'; } else { echo 'no'; } } } update_ipdb();

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.2.60.0090.00316.95
7.2.00.0030.00919.68
7.1.200.0030.00615.98
7.1.100.0000.01218.06
7.1.70.0030.00717.34
7.1.60.0140.01019.48
7.1.50.0090.01217.26
7.1.00.0070.07322.30
7.0.200.0320.00314.94
7.0.80.0300.07719.86
7.0.70.0170.07719.84
7.0.60.0230.03319.78
7.0.50.0070.07320.25
7.0.40.0170.04720.04
7.0.30.0000.05719.98
7.0.20.0000.04720.11
7.0.10.0100.08020.18
7.0.00.0170.06320.10
5.6.280.0030.07320.85
5.6.230.0000.08320.54
5.6.220.0030.07020.63
5.6.210.0000.04320.45
5.6.200.0070.08320.96
5.6.190.0070.08021.18
5.6.180.0030.07321.05
5.6.170.0100.08721.11
5.6.160.0070.07720.93
5.6.150.0030.06320.93
5.6.140.0130.07321.07
5.6.130.0130.05721.00
5.6.120.0070.08321.02
5.6.110.0100.04720.94
5.6.100.0170.05321.03
5.6.90.0070.08321.03
5.6.80.0100.06020.50
5.6.70.0100.06720.45
5.6.60.0100.04320.43
5.6.50.0070.08320.40
5.6.40.0170.07020.37
5.6.30.0070.07720.30
5.6.20.0070.05720.31
5.6.10.0230.06320.43
5.6.00.0000.05320.35
5.5.370.0030.05720.35
5.5.360.0030.08320.45
5.5.350.0100.06320.46
5.5.340.0070.04720.92
5.5.330.0070.05020.93
5.5.320.0070.05320.62
5.5.310.0030.05320.83
5.5.300.0030.07720.72
5.5.290.0130.08020.92
5.5.280.0130.07720.80
5.5.270.0130.07720.73
5.5.260.0070.07720.73
5.5.250.0070.07020.46
5.5.240.0130.07020.28
5.5.230.0100.07720.26
5.5.220.0170.06720.17
5.5.210.0030.08020.30
5.5.200.0000.05720.17
5.5.190.0030.08320.28
5.5.180.0100.07719.99
5.5.160.0070.06320.27
5.5.150.0170.06720.11
5.5.140.0070.07720.20
5.5.130.0070.07320.10
5.5.120.0130.07320.27
5.5.110.0200.06720.11
5.5.100.0130.06320.06
5.5.90.0070.04720.08
5.5.80.0130.07020.07
5.5.70.0100.06020.04
5.5.60.0130.07320.14
5.5.50.0130.05020.14
5.5.40.0030.08020.09
5.5.30.0130.07320.04
5.5.20.0030.06720.05
5.5.10.0100.06020.07
5.5.00.0100.08020.04

preferences:
35.24 ms | 401 KiB | 5 Q