3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); $processor = compose( htmlentities(...), str_split(...), fn ($x) => array_map(strtoupper(...), $x), fn ($x) => array_filter($x, fn ($v) => $v != 'O'), ); $data = "Hello World!"; var_dump( $data, $processor($data), ); // polyfill function compose(...$calls): Closure { $next = fn ($data) => $data; foreach ($calls as $prev) { $next = fn ($data) => $prev($next($data)); } return $next; }

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.5.70.0100.00716.70
8.5.60.0070.01116.91
8.5.50.0080.00616.75
8.5.30.0110.00719.89
8.5.20.0100.00720.15
8.5.10.0140.00816.55
8.5.00.0140.00819.97
8.4.220.0140.00621.45
8.4.210.0090.00521.27
8.4.180.0100.01219.54
8.4.170.0140.00723.96
8.4.160.0130.00923.91
8.4.150.0080.00516.81
8.4.140.0140.00917.70
8.4.130.0140.00718.60
8.4.120.0140.00624.25
8.4.110.0130.00618.96
8.4.100.0060.00517.77
8.4.90.0070.00220.65
8.4.80.0160.00419.40
8.4.70.0480.00518.18
8.4.60.0430.00918.18
8.4.50.0400.01018.18
8.4.40.0430.01218.18
8.4.30.0400.01418.18
8.4.20.0450.00918.18
8.4.10.0420.00818.18
8.3.310.0040.00418.51
8.3.300.0110.00920.72
8.3.290.0140.00720.49
8.3.280.0130.01018.55
8.3.270.0110.00916.57
8.3.260.0100.01116.37
8.3.250.0050.01216.58
8.3.240.0050.00317.30
8.3.230.0080.00516.57
8.3.220.0100.00918.87
8.3.210.0370.00818.18
8.3.200.0330.01118.18
8.3.190.0170.00418.18
8.3.180.0240.00518.18
8.3.170.0310.00318.18
8.3.160.0230.00118.18
8.3.150.0440.00318.18
8.3.140.0390.01018.18
8.3.130.0380.00918.18
8.3.120.0370.00818.18
8.3.110.0390.00718.18
8.3.100.0430.00618.18
8.3.90.0410.01118.18
8.3.80.0450.00618.18
8.3.70.0410.01118.18
8.3.60.0450.01018.18
8.3.50.0240.00618.18
8.3.40.0360.00518.18
8.3.30.0220.00318.18
8.3.20.0160.00618.18
8.3.10.0230.00218.18
8.3.00.0090.00418.18
8.2.310.0130.01018.14
8.2.300.0100.01118.23
8.2.290.0170.00318.98
8.2.280.0190.00118.18
8.2.270.0240.00518.18
8.2.260.0120.00818.18
8.2.250.0150.00418.18
8.2.240.0180.00118.18
8.2.230.0160.00318.18
8.2.220.0170.00318.18
8.2.210.0150.00518.18
8.2.200.0310.01018.18
8.2.190.0380.00418.18
8.2.180.0360.00618.18
8.2.170.0340.00818.18
8.2.160.0420.00618.18
8.2.150.0320.00818.18
8.2.140.0400.00818.18
8.2.130.0470.00918.18
8.2.120.0370.00718.18
8.2.110.0350.00518.18
8.2.100.0180.00218.18
8.2.90.0350.00618.18
8.2.80.0390.00518.18
8.2.70.0340.01118.18
8.2.60.0230.00818.18
8.2.50.0220.00718.18
8.2.40.0350.00518.18
8.2.30.0360.00618.18
8.2.20.0310.00918.18
8.2.10.0320.00718.18
8.2.00.0310.00918.18
8.1.340.0100.01021.57

preferences:
46.74 ms | 887 KiB | 5 Q