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)
8.3.70.0140.00718.43
8.3.60.0100.01318.43
8.3.50.0150.00721.14
8.3.40.0060.00918.83
8.3.30.0110.00418.70
8.3.20.0080.00020.32
8.3.10.0030.00521.89
8.3.00.0080.00020.26
8.2.190.0110.00718.50
8.2.180.0040.01416.88
8.2.170.0160.00322.96
8.2.160.0160.00320.27
8.2.150.0050.00225.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00317.61
8.2.110.0060.00320.91
8.2.100.0120.00017.63
8.2.90.0030.00519.05
8.2.80.0030.00617.97
8.2.70.0090.00017.63
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00419.53
8.2.30.0030.00520.52
8.2.20.0040.00417.67
8.2.10.0000.00818.17
8.2.00.0050.00318.12
8.1.280.0070.00725.92
8.1.270.0130.00623.92
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00623.88
8.1.230.0090.00318.92
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0040.00417.35
8.1.190.0040.00417.00
8.1.180.0040.00418.10
8.1.170.0040.00418.70
8.1.160.0070.00022.13
8.1.150.0040.00418.88
8.1.140.0000.00817.35
8.1.130.0040.00417.56
8.1.120.0080.00017.43
8.1.110.0000.00717.41
8.1.100.0040.00417.33
8.1.90.0080.00017.45
8.1.80.0050.00317.40
8.1.70.0070.00017.39
8.1.60.0030.00517.56
8.1.50.0030.00617.43
8.1.40.0030.00517.48
8.1.30.0080.00017.61
8.1.20.0040.00417.55
8.1.10.0000.00817.57
8.1.00.0000.00817.34
8.0.300.0080.00018.77
8.0.290.0060.00316.75
8.0.280.0080.00018.51
8.0.270.0080.00017.26
8.0.260.0070.00317.25
8.0.250.0070.00016.89
8.0.240.0030.00316.90
8.0.230.0030.00317.03
8.0.220.0030.00316.95
8.0.210.0030.00316.95
8.0.200.0040.00417.00
8.0.190.0000.00817.06
8.0.180.0030.00817.05
8.0.170.0040.00417.02
8.0.160.0030.00416.93
8.0.150.0000.00716.89
8.0.140.0040.00416.96
8.0.130.0060.00013.39
8.0.120.0080.00016.88
8.0.110.0040.00416.92
8.0.100.0000.00816.84
8.0.90.0000.00816.81
8.0.80.0090.00616.91
8.0.70.0030.00517.01
8.0.60.0050.00316.96
8.0.50.0040.00516.84
8.0.30.0120.00817.10
8.0.20.0060.01217.40
8.0.10.0040.00417.08
8.0.00.0060.01316.78
7.4.330.0050.00015.08
7.4.320.0040.00416.61
7.4.300.0000.00616.61
7.4.290.0000.00616.60
7.4.280.0050.00516.51
7.4.270.0070.00016.59
7.4.260.0040.00416.61
7.4.250.0000.00816.49
7.4.240.0010.00616.52
7.4.230.0000.00716.67
7.4.220.0130.01316.61
7.4.210.0060.00916.57
7.4.200.0030.00316.33
7.4.160.0090.00616.37
7.4.150.0110.00617.40
7.4.140.0110.00917.86
7.4.130.0100.01016.57
7.4.120.0120.00616.60
7.4.110.0070.01016.68
7.4.100.0150.00316.49
7.4.90.0120.00616.59
7.4.80.0080.00819.39
7.4.70.0030.01616.65
7.4.60.0040.01216.39
7.4.50.0040.00416.63
7.4.40.0070.01016.59
7.4.30.0070.01716.64
7.4.00.0110.00415.09
7.3.330.0050.00213.33
7.3.320.0000.00513.44
7.3.310.0000.00616.31
7.3.300.0030.00316.28
7.3.290.0080.00716.33
7.3.280.0020.01416.33
7.3.270.0140.00317.40
7.3.260.0070.01016.51
7.3.250.0080.00916.44
7.3.240.0060.01916.30
7.3.230.0100.01316.52
7.3.210.0110.00616.41
7.3.200.0110.00516.37
7.3.190.0150.00316.38
7.3.180.0130.00316.37
7.3.170.0030.01316.42
7.3.160.0060.01216.39
7.2.330.0070.01116.42
7.2.320.0120.00616.60
7.2.310.0040.01416.52
7.2.300.0120.00616.54
7.2.290.0110.01116.71
7.2.60.0120.00316.96
7.2.00.0040.00819.08
7.1.200.0110.00415.75
7.1.100.0000.01618.25
7.1.70.0050.00317.13
7.1.60.0100.01419.11
7.1.50.0040.01216.72
7.1.00.0070.07022.43
7.0.200.0080.00016.40
7.0.60.0030.06719.94
7.0.50.0070.07717.88
7.0.40.0030.04319.98
7.0.30.0230.04720.07
7.0.20.0170.04320.23
7.0.10.0070.04020.08
7.0.00.0100.03720.10
5.6.280.0030.07320.93
5.6.210.0030.05720.63
5.6.200.0130.07718.11
5.6.190.0100.06720.43
5.6.180.0200.03720.39
5.6.170.0430.06720.50
5.6.160.0100.08320.57
5.6.150.0070.04018.27
5.6.140.0070.07318.18
5.6.130.0030.08718.27
5.6.120.0030.05721.02
5.6.110.0070.08721.07
5.6.100.0030.04021.02
5.6.90.0100.08021.04
5.6.80.0030.05320.36
5.5.350.0200.03720.36
5.5.340.0000.04318.07
5.5.330.0070.03720.57
5.5.320.0230.03720.34
5.5.310.0270.05320.28
5.5.300.0130.07017.98
5.5.290.0030.04318.07
5.5.280.0070.04020.66
5.5.270.0100.06020.86
5.5.260.0130.07020.87
5.5.250.0070.04720.78
5.5.240.0100.06720.16
5.4.450.1070.04719.49
5.4.440.0970.06019.29
5.4.430.1100.04719.60
5.4.420.1030.05019.46
5.4.410.1070.05019.45
5.4.400.1030.05319.16
5.4.390.1230.06019.10
5.4.380.0970.05019.38
5.4.370.1070.04719.29
5.4.360.1000.05719.26
5.4.350.1030.04719.25
5.4.340.1000.06318.98
5.4.320.1030.05019.30
5.4.310.1070.05318.98
5.4.300.1070.06319.28
5.4.290.1030.05319.25
5.4.280.1030.05719.12
5.4.270.0930.05019.23
5.4.260.1070.04718.86
5.4.250.1000.05019.25
5.4.240.1030.05018.86
5.4.230.0970.05719.27
5.4.220.1000.05719.15
5.4.210.1130.07019.05
5.4.200.0730.05719.22
5.4.190.1200.05719.21
5.4.180.0970.05319.13
5.4.170.1000.05719.21
5.4.160.1130.03718.85
5.4.150.0930.06319.12
5.4.140.0870.04016.38
5.4.130.0800.04716.57
5.4.120.0870.04716.34
5.4.110.0800.05016.59
5.4.100.0730.05016.63
5.4.90.0900.05716.30
5.4.80.0930.05716.55
5.4.70.0070.04716.62
5.4.60.0270.04316.52
5.4.50.0300.06016.42
5.4.40.0200.06016.42
5.4.30.0000.03716.34
5.4.20.0030.04716.32
5.4.10.0230.07016.48

preferences:
70.28 ms | 401 KiB | 5 Q