3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Begin polyfills. function get_option(){} function add_option(){} function update_option(){} // Begin Kristine's code sample. $options = get_option (foo_cache_plugin); if ( !$options) { //add option if option doesn't exist yet add_option (foo_cache_plugin, array ( 'foo_should_cache' => 'true', 'foo_should_display_notice' => 'false', 'foo_should_cache_logged_in_users' => 'false' )); } else { //update option if it exists $options [foo_should_cache] = 'true'; $options [foo_should_display_notice] = 'false'; $options [foo_should_cache_logged_in_users] = 'false'; update_option (foo_cache_plugin, $options); } };

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)
5.6.140.0100.03718.25
5.6.130.0100.03718.21
5.6.120.0100.08321.15
5.6.110.0000.09321.01
5.6.100.0070.08021.12
5.6.90.0070.09021.01
5.6.80.0070.03720.38
5.5.300.0070.08318.05
5.5.290.0070.05318.07
5.5.280.0130.07720.74
5.5.270.0100.08320.87
5.5.260.0130.07720.73
5.5.250.0070.03720.68
5.5.240.0070.07720.20
5.4.450.0800.06019.64
5.4.440.0730.06019.39
5.4.430.0830.07319.70
5.4.420.0830.06019.39
5.4.410.0870.05319.57
5.4.400.0800.05319.07
5.4.390.1000.05719.14
5.4.380.0800.05019.12
5.4.370.1000.06019.29
5.4.360.1030.05719.22
5.4.350.0800.05018.97
5.4.340.0970.05719.23
5.4.320.0970.05719.30
5.4.310.0800.06019.30
5.4.300.0900.05719.23
5.4.290.0830.05019.38
5.4.280.0830.05719.12
5.4.270.0970.04018.97
5.4.260.0670.06019.29
5.4.250.0830.04718.85
5.4.240.0770.05319.25
5.4.230.0900.04319.37
5.4.220.0800.05718.86
5.4.210.0830.05319.29
5.4.200.0930.05319.05
5.4.190.1070.04019.22
5.4.180.1100.05019.14
5.4.170.1030.05319.25
5.4.160.1000.05319.13
5.4.150.0830.04719.13
5.4.140.0730.05316.78
5.4.130.0730.05016.34
5.4.120.0800.04716.54
5.4.110.1030.07016.24
5.4.100.0900.05016.46
5.4.90.0900.04716.66
5.4.80.0900.04316.49
5.4.70.0000.08016.22
5.4.60.0200.04016.50
5.4.50.0200.06716.52
5.4.40.0270.06716.43
5.4.30.0030.06716.22
5.4.20.0000.04016.25
5.4.10.0230.04316.16

preferences:
126.77 ms | 1398 KiB | 7 Q