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.4.120.0140.00623.99
8.4.110.0100.00618.85
8.4.100.0120.00718.90
8.4.90.0030.00820.64
8.4.80.0060.00318.76
8.4.70.0060.00218.02
8.4.60.0140.00817.64
8.4.50.0090.01018.15
8.4.40.0160.00317.93
8.4.30.0070.01320.34
8.4.20.0100.01019.98
8.4.10.0090.00021.25
8.3.250.0090.00918.75
8.3.240.0110.00917.13
8.3.230.0040.00616.98
8.3.220.0050.00218.80
8.3.210.0120.00818.59
8.3.200.0110.00816.76
8.3.190.0060.00219.21
8.3.180.0100.00816.54
8.3.170.0120.00617.29
8.3.160.0060.01320.92
8.3.150.0110.00719.09
8.3.140.0040.01117.03
8.3.130.0000.00818.64
8.3.120.0040.00420.86
8.3.110.0090.00020.94
8.3.100.0130.00720.60
8.3.90.0050.00326.77
8.3.80.0030.00619.36
8.3.70.0110.00416.63
8.3.60.0070.00716.75
8.3.50.0100.00723.59
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.290.0060.00222.40
8.2.280.0120.00718.47
8.2.270.0060.00917.31
8.2.260.0110.00716.50
8.2.250.0040.01118.32
8.2.240.0040.01518.94
8.2.230.0070.00422.58
8.2.220.0090.00037.54
8.2.210.0040.00426.77
8.2.200.0040.00818.88
8.2.190.0140.00416.91
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.330.0100.00922.12
8.1.320.0110.00716.40
8.1.310.0100.00318.42
8.1.300.0110.00017.92
8.1.290.0040.00430.84
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:
27.57 ms | 403 KiB | 5 Q