3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Add the core functions. */ function apply_filters( $hook_name, $value ) { return $value; } function wp_parse_str( $string, &$array ) { parse_str( $string, $array ); /** * Filters the array of variables derived from a parsed string. * * @since 2.3.0 * * @param array $array The array populated with variables. */ $array = apply_filters( 'wp_parse_str', $array ); } function wp_parse_args( $args, $defaults = array() ) { if ( is_object( $args ) ) { $parsed_args = get_object_vars( $args ); } elseif ( is_array( $args ) ) { $parsed_args =& $args; } else { wp_parse_str( $args, $parsed_args ); } if ( is_array( $defaults ) && $defaults ) { return array_merge( $defaults, $parsed_args ); } return $parsed_args; } /** * Run the sample code to validate what happens when $args is null. */ $args = null; $defaults = array( 'foo' => 'bar' ); $args = wp_parse_args( $args, $defaults ); var_dump( $args ); // array(1) { ["foo"]=> string(3) "bar" }

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.0070.00716.75
8.3.50.0120.00316.34
8.3.40.0030.01721.64
8.3.30.0120.00318.54
8.3.20.0090.00024.18
8.3.10.0000.00824.66
8.3.00.0060.00326.16
8.2.180.0100.01025.92
8.2.170.0040.01119.01
8.2.160.0040.01122.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00918.72
8.2.110.0060.00320.21
8.2.100.0120.00017.84
8.2.90.0030.00519.22
8.2.80.0080.00017.97
8.2.70.0060.00317.75
8.2.60.0000.00819.22
8.2.50.0040.00418.05
8.2.40.0040.00419.22
8.2.30.0040.00418.07
8.2.20.0040.00418.11
8.2.10.0070.00019.18
8.2.00.0040.00419.23
8.1.280.0070.01325.92
8.1.270.0080.00023.99
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0030.00620.84
8.1.230.0000.01119.00
8.1.220.0050.00317.76
8.1.210.0030.00518.77
8.1.200.0030.00617.22
8.1.190.0080.00017.22
8.1.180.0060.00318.10
8.1.170.0040.00418.66
8.1.160.0050.00218.84
8.1.150.0040.00418.80
8.1.140.0000.00718.94
8.1.130.0040.00420.15
8.1.120.0040.00417.50
8.1.110.0000.00817.46
8.1.100.0040.00417.29
8.1.90.0040.00417.49
8.1.80.0040.00417.37
8.1.70.0000.00917.47
8.1.60.0000.01017.56
8.1.50.0040.00417.52
8.1.40.0000.00817.57
8.1.30.0040.00417.70
8.1.20.0000.00817.48
8.1.10.0040.00417.43
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0030.00318.33
8.0.270.0040.00418.01
8.0.260.0030.00318.55
8.0.250.0030.00316.83
8.0.240.0030.00316.95
8.0.230.0000.00716.96
8.0.220.0000.00716.90
8.0.210.0030.00316.90
8.0.200.0030.00316.84
8.0.190.0020.00516.95
8.0.180.0000.00816.84
8.0.170.0040.00416.99
8.0.160.0000.00716.86
8.0.150.0030.00516.86
8.0.140.0070.00016.75
8.0.130.0000.00613.39
8.0.120.0000.00716.79
8.0.110.0040.00416.68
8.0.100.0040.00416.84
8.0.90.0000.00716.98
8.0.80.0100.00716.85
8.0.70.0040.00416.88
8.0.60.0000.00816.82
8.0.50.0050.00216.87
8.0.30.0120.00417.20
8.0.20.0140.00817.28
8.0.10.0040.00416.89
8.0.00.0110.01116.91
7.4.330.0000.00515.55
7.4.320.0040.00416.61
7.4.300.0030.00316.58
7.4.290.0030.00516.45
7.4.280.0060.00316.50
7.4.270.0040.00416.56
7.4.260.0000.00613.29
7.4.250.0030.00316.59
7.4.240.0070.00016.59
7.4.230.0000.00716.67
7.4.220.0000.00716.46
7.4.210.0070.00816.52
7.4.200.0000.00716.71
7.4.130.0060.01116.38
7.4.120.0110.00816.11
7.4.110.0080.01216.08
7.4.100.0130.01316.52
7.4.90.0070.01016.27
7.4.80.0120.00916.24
7.4.70.0170.00316.21
7.4.60.0070.01116.35
7.4.50.0120.00616.08
7.4.40.0070.01616.25
7.4.30.0090.00915.98
7.4.20.0110.00716.09
7.4.10.0090.00916.28
7.4.00.0140.01016.68
7.3.330.0000.00716.35
7.3.320.0050.00013.26
7.3.310.0000.00716.36
7.3.300.0000.00716.32
7.3.290.0070.00716.28
7.3.260.0070.01116.57
7.3.250.0060.01616.54
7.3.240.0090.01016.29
7.3.230.0140.00516.50
7.3.220.0090.01216.25
7.3.210.0130.00916.14
7.3.200.0040.01516.57
7.3.190.0070.01816.55
7.3.180.0100.01316.09
7.3.170.0070.01116.31
7.3.160.0030.01716.50
7.3.150.0120.00616.11
7.3.140.0060.01216.57
7.3.130.0060.01216.51
7.3.120.0140.00716.45
7.3.110.0090.00916.55
7.3.100.0100.00716.18
7.3.90.0030.01316.57
7.3.80.0090.01316.77
7.3.70.0140.00316.26
7.3.60.0000.01716.29
7.3.50.0160.00016.35
7.3.40.0070.01016.29
7.3.30.0120.00616.13
7.3.20.0900.00716.23
7.3.10.0110.01116.24
7.3.00.0080.00816.49

preferences:
35.07 ms | 400 KiB | 5 Q