3v4l.org

run code in 300+ PHP versions simultaneously
<?php function flatten_array($simple){ static $outputs=array(); foreach ( $simple as $value) { if(is_array($value)){ flatten_array($value); } else { $outputs[]=$value; } } return $outputs; } $eg=['s'=>['p','n'=>['t']]]; $out=flatten_array($eg); print_r($out); echo "\n---\n"; $out=flatten_array($eg); print_r($out);

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.01018.56
8.3.50.0110.00418.36
8.3.40.0090.00618.75
8.3.30.0140.00018.71
8.3.20.0070.00018.78
8.3.10.0070.00021.77
8.3.00.0040.00423.65
8.2.180.0040.01118.30
8.2.170.0120.00322.96
8.2.160.0110.00419.03
8.2.150.0030.00524.18
8.2.140.0000.00724.66
8.2.130.0040.00419.71
8.2.120.0040.00426.35
8.2.110.0080.00521.06
8.2.100.0080.00417.72
8.2.90.0000.00818.34
8.2.80.0080.00017.97
8.2.70.0000.00817.93
8.2.60.0000.00818.01
8.2.50.0040.00418.10
8.2.40.0080.00019.30
8.2.30.0070.00019.23
8.2.20.0000.00818.11
8.2.10.0000.00719.38
8.2.00.0050.00219.42
8.1.280.0070.00725.92
8.1.270.0000.00822.02
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00322.11
8.1.230.0080.00422.50
8.1.220.0030.00617.74
8.1.210.0070.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0030.00518.84
8.1.160.0000.00818.82
8.1.150.0000.00718.96
8.1.140.0040.00417.61
8.1.130.0070.00019.06
8.1.120.0070.00017.46
8.1.110.0030.00717.50
8.1.100.0070.00017.40
8.1.90.0070.00017.42
8.1.80.0050.00217.50
8.1.70.0070.00017.39
8.1.60.0000.00817.61
8.1.50.0040.00417.51
8.1.40.0000.00817.51
8.1.30.0070.00317.64
8.1.20.0000.00717.68
8.1.10.0040.00417.52
8.1.00.0030.00617.45
8.0.300.0050.00319.43
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0030.00317.30
8.0.260.0000.00617.26
8.0.250.0000.00716.98
8.0.240.0040.00417.00
8.0.230.0000.00716.87
8.0.220.0000.00716.96
8.0.210.0070.00016.79
8.0.200.0030.00317.01
8.0.190.0000.00716.97
8.0.180.0030.00516.88
8.0.170.0050.00316.94
8.0.160.0030.00416.85
8.0.150.0040.00416.93
8.0.140.0070.00016.76
8.0.130.0050.00013.37
8.0.120.0040.00416.85
8.0.110.0040.00417.00
8.0.100.0040.00416.84
8.0.90.0000.00716.89
8.0.80.0100.00916.81
8.0.70.0000.00816.85
8.0.60.0040.00416.88
8.0.50.0040.00416.94
8.0.30.0090.00917.16
8.0.20.0100.01017.40
8.0.10.0040.00416.96
8.0.00.0110.00616.72
7.4.330.0000.00415.55
7.4.320.0030.00316.51
7.4.300.0060.00016.61
7.4.290.0050.00516.60
7.4.280.0090.00016.43
7.4.270.0060.00316.51
7.4.260.0030.00516.60
7.4.250.0000.00816.57
7.4.240.0030.00516.48
7.4.230.0000.00716.54
7.4.220.0000.00916.70
7.4.210.0040.01116.59
7.4.200.0000.00716.44
7.4.160.0050.01316.55
7.4.140.0110.00817.86
7.4.130.0060.01216.44
7.4.120.0080.01216.50
7.4.110.0160.00916.51
7.4.100.0080.00816.55
7.4.90.0060.01216.61
7.4.80.0130.00719.39
7.4.70.0090.00916.42
7.4.60.0120.01316.64
7.4.50.0060.00916.38
7.4.40.0070.01116.53
7.4.00.0110.00415.03
7.3.330.0030.00313.17
7.3.320.0000.00613.28
7.3.310.0070.00016.29
7.3.300.0000.00716.27
7.3.290.0000.00716.30
7.3.280.0080.01116.27
7.3.260.0090.00916.55
7.3.240.0100.01016.55
7.3.230.0110.00816.49
7.3.210.0070.01016.67
7.3.200.0100.00716.59
7.3.190.0130.00316.61
7.3.180.0120.00616.63
7.3.170.0090.01216.66
7.3.160.0080.01116.29
7.2.330.0110.00716.64
7.2.320.0120.00616.59
7.2.310.0080.01416.72
7.2.300.0090.00616.84
7.2.290.0120.00916.57
7.2.70.0160.01315.06
7.2.60.0180.00314.79
7.2.50.0100.01314.82
7.2.40.0230.00615.01
7.2.30.0150.01515.15
7.2.20.0190.00814.98
7.2.10.0190.01015.04
7.2.00.0130.00914.47
7.1.200.0030.01015.89
7.1.170.0140.01413.76
7.1.160.0180.00413.81
7.1.150.0150.00613.87
7.1.140.0180.00413.66
7.1.130.0180.01113.66
7.1.120.0190.00313.68
7.1.110.0130.01013.98
7.1.100.1460.01013.57
7.1.90.0180.00613.86
7.1.80.0190.00613.62
7.1.70.0170.00813.79
7.1.60.0290.01331.71
7.1.50.0360.00731.94
7.1.40.0430.01531.55
7.1.30.0310.00931.92
7.1.20.0370.01031.99
7.1.10.0180.00613.55
7.1.00.0220.00913.71

preferences:
61.03 ms | 401 KiB | 5 Q