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.60.0170.00318.27
8.3.50.0100.01016.50
8.3.40.0090.00618.68
8.3.30.0070.00718.84
8.3.20.0050.00220.21
8.3.10.0080.00021.57
8.3.00.0000.00720.24
8.2.180.0110.00718.29
8.2.170.0040.01222.96
8.2.160.0070.00720.53
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0050.00317.50
8.2.110.0060.00319.39
8.2.100.0080.00317.63
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0030.00518.05
8.2.50.0050.00318.07
8.2.40.0040.00419.34
8.2.30.0030.00622.42
8.2.20.0000.00817.73
8.2.10.0040.00418.11
8.2.00.0000.00717.96
8.1.280.0070.00725.92
8.1.270.0110.00424.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.93
8.1.230.0070.00418.78
8.1.220.0040.00417.79
8.1.210.0000.00918.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0030.00618.65
8.1.160.0000.00721.92
8.1.150.0040.00418.98
8.1.140.0080.00017.32
8.1.130.0030.00317.75
8.1.120.0040.00417.46
8.1.110.0000.00717.43
8.1.100.0000.00817.48
8.1.90.0030.00517.48
8.1.80.0040.00417.45
8.1.70.0040.00417.48
8.1.60.0000.00717.43
8.1.50.0000.00817.55
8.1.40.0040.00417.50
8.1.30.0060.00317.63
8.1.20.0000.00817.65
8.1.10.0070.00017.46
8.1.00.0040.00417.40
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0070.00018.43
8.0.270.0040.00417.16
8.0.260.0000.00917.26
8.0.250.0050.00217.04
8.0.240.0000.00617.00
8.0.230.0030.00317.02
8.0.220.0000.00716.91
8.0.210.0000.00716.92
8.0.200.0070.00016.98
8.0.190.0080.00016.93
8.0.180.0050.00516.95
8.0.170.0040.00416.86
8.0.160.0000.00716.92
8.0.150.0000.00816.80
8.0.140.0000.00716.84
8.0.130.0050.00013.40
8.0.120.0050.00316.89
8.0.110.0000.00816.99
8.0.100.0000.00917.00
8.0.90.0070.00016.88
8.0.80.0030.01317.00
8.0.70.0090.00016.83
8.0.60.0050.00216.79
8.0.50.0050.00316.80
8.0.30.0110.00717.33
8.0.20.0110.00817.40
8.0.10.0000.00717.14
8.0.00.0110.00516.71
7.4.330.0050.00015.09
7.4.320.0000.00716.41
7.4.300.0060.00016.61
7.4.290.0030.00316.61
7.4.280.0040.00716.45
7.4.270.0070.00016.53
7.4.260.0040.00416.60
7.4.250.0050.00216.59
7.4.240.0060.00216.47
7.4.230.0000.00716.62
7.4.220.0070.02016.50
7.4.210.0080.00516.61
7.4.200.0030.00316.48
7.4.160.0080.00816.46
7.4.150.0070.01417.40
7.4.140.0130.00617.86
7.4.130.0050.01516.46
7.4.120.0050.01316.45
7.4.110.0060.01116.61
7.4.100.0090.00916.48
7.4.90.0120.00616.43
7.4.80.0080.01119.39
7.4.70.0140.00316.58
7.4.60.0100.00616.30
7.4.50.0030.00516.45
7.4.40.0070.01016.73
7.4.30.0130.00716.61
7.4.00.0030.01215.24
7.3.330.0030.00313.36
7.3.320.0050.00013.14
7.3.310.0000.00816.41
7.3.300.0070.00016.30
7.3.290.0070.00916.34
7.3.280.0120.00616.35
7.3.270.0030.01417.40
7.3.260.0070.01016.23
7.3.250.0130.00616.33
7.3.240.0140.00716.33
7.3.230.0120.00516.47
7.3.210.0120.00416.49
7.3.200.0160.00716.63
7.3.190.0060.01616.45
7.3.180.0110.00716.49
7.3.170.0100.00716.27
7.3.160.0160.00316.53
7.3.10.0040.01116.57
7.3.00.0060.00616.69
7.2.330.0170.00716.82
7.2.320.0150.00316.85
7.2.310.0080.00916.37
7.2.300.0120.00616.48
7.2.290.0060.01616.73
7.2.130.0060.00316.85
7.2.120.0070.00716.96
7.2.110.0060.00916.86
7.2.100.0040.00717.02
7.2.90.0100.00316.97
7.2.80.0040.01116.70
7.2.70.0090.00317.01
7.2.60.0050.01216.89
7.2.50.0040.00816.98
7.2.40.0060.00916.88
7.2.30.0090.00617.08
7.2.20.0070.00716.74
7.2.10.0040.00816.68
7.2.00.0040.01217.89
7.1.250.0070.00715.63
7.1.200.0070.00415.67
7.1.100.0050.00517.66
7.1.70.0030.00516.87
7.1.60.0190.00619.11
7.1.50.0140.00716.86
7.1.00.0030.07722.54
7.0.200.0030.00516.74
7.0.60.0170.06019.96
7.0.50.0100.07317.89
7.0.40.0170.07720.17
7.0.30.0100.04720.11
7.0.20.0400.07320.11
7.0.10.0070.04320.13
7.0.00.0100.07020.25
5.6.280.0070.05021.13
5.6.210.0170.05720.61
5.6.200.0030.05718.29
5.6.190.0070.05020.39
5.6.180.0470.06320.48
5.6.170.0230.09020.71
5.6.160.0130.08020.46
5.6.150.0030.07718.15
5.6.140.0070.04018.21
5.6.130.0030.09018.18
5.6.120.0130.08021.02
5.6.110.0130.07721.00
5.6.100.0070.05021.00
5.6.90.0070.08721.02
5.6.80.0130.03320.36
5.5.350.0230.06320.38
5.5.340.0030.04717.98
5.5.330.0070.08720.27
5.5.320.0030.07720.27
5.5.310.0230.03320.28
5.5.300.0030.04017.98
5.5.290.0070.07717.94
5.5.280.0030.04320.98
5.5.270.0100.08320.86
5.5.260.0200.05720.87
5.5.250.0070.06020.62
5.5.240.0170.07720.07
5.4.450.0500.07319.64
5.4.440.0530.07319.41
5.4.430.0600.05719.54
5.4.420.0470.04319.27
5.4.410.0500.03319.26
5.4.400.0530.05319.18
5.4.390.0470.05019.06
5.4.380.0500.06319.09
5.4.370.0570.03718.95
5.4.360.0570.03719.21
5.4.350.0600.06019.08
5.4.340.0470.03719.15
5.4.320.0430.05019.19
5.4.310.0430.04019.24
5.4.300.0530.06319.32
5.4.290.0530.04019.17
5.4.280.0400.05018.94
5.4.270.0500.03718.87
5.4.260.0470.04719.31
5.4.250.0530.06719.30
5.4.240.0600.06019.08
5.4.230.0500.03319.17
5.4.220.0470.03718.93
5.4.210.0530.04719.22
5.4.200.0470.04019.14
5.4.190.0530.06019.21
5.4.180.0470.05018.98
5.4.170.0430.04719.21
5.4.160.0600.03319.17
5.4.150.0570.04719.14
5.4.140.0430.03316.39
5.4.130.0530.04016.55
5.4.120.0430.03716.39
5.4.110.0530.06316.50
5.4.100.0500.06016.31
5.4.90.0430.03316.42
5.4.80.0530.03716.22

preferences:
63.71 ms | 400 KiB | 5 Q