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 ); var_dump( $us_states ); $options = array_unshift( $us_states, new StdClass() ); var_dump( $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.0030.01316.50
8.3.50.0130.00916.38
8.3.40.0100.00718.71
8.3.30.0100.00718.54
8.3.20.0040.00420.20
8.3.10.0000.00823.65
8.3.00.0050.00321.96
8.2.180.0150.00716.60
8.2.170.0120.00422.96
8.2.160.0160.00019.08
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0050.00319.32
8.2.120.0030.00526.35
8.2.110.0030.00720.86
8.2.100.0090.01317.35
8.2.90.0050.00319.13
8.2.80.0000.00817.97
8.2.70.0040.00417.38
8.2.60.0040.00418.03
8.2.50.0030.00618.10
8.2.40.0080.00020.44
8.2.30.0000.00821.03
8.2.20.0060.00318.17
8.2.10.0000.00918.05
8.2.00.0080.00018.15
8.1.280.0100.01325.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.18
8.1.230.0030.01019.16
8.1.220.0030.00517.79
8.1.210.0030.00618.77
8.1.200.0050.00817.38
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0000.00718.94
8.1.150.0060.00318.81
8.1.140.0040.00419.51
8.1.130.0000.00718.86
8.1.120.0060.00317.38
8.1.110.0000.00817.50
8.1.100.0030.00617.48
8.1.90.0080.00017.47
8.1.80.0040.00417.38
8.1.70.0000.00717.37
8.1.60.0060.00317.50
8.1.50.0030.00617.54
8.1.40.0000.00817.50
8.1.30.0030.00617.67
8.1.20.0050.00317.63
8.1.10.0030.00717.57
8.1.00.0040.00417.41
8.0.300.0000.00720.16
8.0.290.0060.00316.63
8.0.280.0040.00418.30
8.0.270.0060.00317.14
8.0.260.0000.00716.81
8.0.250.0070.00016.95
8.0.240.0000.00917.03
8.0.230.0070.00016.87
8.0.220.0030.00316.81
8.0.210.0000.00716.90
8.0.200.0050.00317.04
8.0.190.0030.00516.83
8.0.180.0040.00416.86
8.0.170.0050.00217.01
8.0.160.0070.00316.83
8.0.150.0040.00416.88
8.0.140.0080.00016.75
8.0.130.0030.00313.36
8.0.120.0050.00316.96
8.0.110.0000.00717.01
8.0.100.0050.00316.93
8.0.90.0040.00416.76
8.0.80.0120.01216.82
8.0.70.0050.00216.70
8.0.60.0000.00716.86
8.0.50.0040.00416.89
8.0.30.0120.00817.09
8.0.20.0140.00817.40
8.0.10.0060.00316.89
8.0.00.0180.00616.70
7.4.330.0000.00515.55
7.4.320.0030.00316.52
7.4.300.0080.00016.61
7.4.290.0050.00216.50
7.4.280.0030.00516.36
7.4.270.0070.00016.67
7.4.260.0080.00016.59
7.4.250.0040.00416.57
7.4.240.0000.00716.63
7.4.230.0040.00416.41
7.4.220.0090.00916.62
7.4.210.0050.01116.66
7.4.200.0060.00316.35
7.4.160.0120.00816.54
7.4.150.0070.01417.40
7.4.140.0130.01317.86
7.4.130.0130.00816.55
7.4.120.0090.01516.46
7.3.330.0020.00213.13
7.3.320.0030.00313.32
7.3.310.0030.00616.38
7.3.300.0070.00016.24
7.3.290.0030.00316.30
7.3.280.0120.00916.27
7.3.270.0050.02017.40
7.3.260.0070.01116.42
7.3.250.0150.00816.32
7.3.240.0130.01116.31

preferences:
41.9 ms | 401 KiB | 5 Q