3v4l.org

run code in 300+ PHP versions simultaneously
<?php $us_states = array( 'alabama', 'arkansas', 'california', 'colorado', 'connecticut', 'delaware', 'district_of_columbia', 'florida', 'georgia', 'hawaii', 'idaho', 'illinois', 'indiana', 'iowa', 'kansas', 'kentucky', 'louisiana', 'maine', 'maryland', 'massachusetts', 'michigan', 'minnesota', 'mississippi', 'missouri', 'montana', 'nebraska', 'nevada', 'new_hampshire', 'new_jersey', 'new_mexico', 'new_york', 'north_carolina', 'north_dakota', 'ohio', 'oklahoma', 'oregon', 'pennsylvania', 'rhode_island', 'south_carolina', 'south_dakota', 'tennessee', 'texas', 'utah', 'vermont', 'virginia', 'washington', 'west_virginia', 'wisconsin', 'wyoming' ); $us_states = array_map( function ( $val ) { $obj = new StdClass(); $obj->$val = $val; return $obj; }, $us_states ); // array_unshift( // array_map( // function ( $val ) { // $obj = new StdClass(); // $obj->$val = $val; // return $obj; // }, // $us_states // ), // new StdClass() // ); var_dump( array_merge( [new StdClass()], $us_states, [new StdClass()] ) );

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.0100.01416.63
8.3.50.0090.00616.35
8.3.40.0160.00018.53
8.3.30.0070.00718.84
8.3.20.0040.00420.28
8.3.10.0050.00523.61
8.3.00.0080.00021.77
8.2.180.0130.01016.38
8.2.170.0130.00922.96
8.2.160.0150.00019.03
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0060.00619.03
8.2.120.0040.00426.35
8.2.110.0060.00320.39
8.2.100.0080.00417.84
8.2.90.0040.00417.78
8.2.80.0050.00318.09
8.2.70.0080.00417.25
8.2.60.0050.00317.63
8.2.50.0040.00417.55
8.2.40.0000.00817.91
8.2.30.0050.00317.70
8.2.20.0040.00418.07
8.2.10.0030.00618.14
8.2.00.0030.00617.95
8.1.280.0160.00325.92
8.1.270.0030.00522.19
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00622.08
8.1.230.0080.00423.91
8.1.220.0030.00517.74
8.1.210.0040.00418.92
8.1.200.0060.00317.38
8.1.190.0050.00517.35
8.1.180.0000.00918.10
8.1.170.0080.00017.68
8.1.160.0000.00818.79
8.1.150.0040.00420.66
8.1.140.0040.00419.50
8.1.130.0040.00418.77
8.1.120.0020.00517.55
8.1.110.0000.00917.46
8.1.100.0030.00517.36
8.1.90.0000.00817.38
8.1.80.0000.01017.50
8.1.70.0040.00417.51
8.1.60.0000.00817.51
8.1.50.0000.00817.43
8.1.40.0090.00017.43
8.1.30.0030.00617.65
8.1.20.0030.00517.72
8.1.10.0040.00417.56
8.1.00.0030.00517.52
8.0.300.0070.00019.84
8.0.290.0080.00016.75
8.0.280.0050.00217.95
8.0.270.0000.00717.91
8.0.260.0030.00316.73
8.0.250.0070.00016.96
8.0.240.0040.00416.94
8.0.230.0040.00416.98
8.0.220.0020.00516.93
8.0.210.0000.00716.75
8.0.200.0040.00416.91
8.0.190.0060.00316.99
8.0.180.0040.00416.96
8.0.170.0030.00516.94
8.0.160.0060.00316.80
8.0.150.0000.00816.83
8.0.140.0030.00616.87
8.0.130.0030.00313.34
8.0.120.0030.00516.86
8.0.110.0050.00317.00
8.0.100.0080.00016.89
8.0.90.0040.00416.91
8.0.80.0000.01916.86
8.0.70.0050.00316.82
8.0.60.0040.00416.96
8.0.50.0040.00416.88
8.0.30.0070.01117.16
8.0.20.0190.00517.40
8.0.10.0030.00516.80
8.0.00.0120.00916.96
7.4.330.0050.00015.55
7.4.320.0040.00416.58
7.4.300.0040.00416.36
7.4.290.0040.00416.52
7.4.280.0040.00416.57
7.4.270.0070.00016.61
7.4.260.0070.00016.53
7.4.250.0040.00416.49
7.4.240.0030.00516.52
7.4.230.0000.00716.67
7.4.220.0060.01516.55
7.4.210.0030.01316.66
7.4.200.0080.00016.62
7.4.160.0070.01216.58
7.4.150.0130.01017.40
7.4.140.0160.00717.86
7.4.130.0090.01216.58
7.4.120.0150.00916.43
7.3.330.0030.00613.17
7.3.320.0050.00013.13
7.3.310.0100.00016.30
7.3.300.0040.00416.20
7.3.290.0050.00216.31
7.3.280.0070.01216.27
7.3.270.0150.00617.40
7.3.260.0080.01416.46
7.3.250.0080.00816.34
7.3.240.0120.00716.47

preferences:
35.36 ms | 401 KiB | 5 Q