3v4l.org

run code in 300+ PHP versions simultaneously
<?php function processor(array $callbacks) { // filter by instance clas $callbacks = array_filter(...); // check number of callbacks for custom logic if (count($callbacks) == 1) { return $callbacks(); } // modyfing by a condition if (DEBUG) { $callbacks[] = debug_logger(...); } return compose($callbacks)(); } function processor2(array $callbacks) { // loop with $callbacks[$i] + $result ??? }

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.0150.00520.44
8.4.110.0090.01018.87
8.4.100.0030.00718.96
8.4.90.0130.00623.95
8.4.80.0090.01019.34
8.4.70.0300.00618.18
8.4.60.0370.00618.18
8.4.50.0320.00818.18
8.4.40.0440.00718.18
8.4.30.0350.00718.18
8.4.20.0350.00518.18
8.4.10.0330.00618.18
8.3.250.0050.00318.84
8.3.240.0110.00816.87
8.3.230.0050.00416.38
8.3.220.0110.00617.29
8.3.210.0350.00818.18
8.3.200.0330.00418.18
8.3.190.0250.00318.18
8.3.180.0210.00418.18
8.3.170.0350.00618.18
8.3.160.0330.00918.18
8.3.150.0320.00918.18
8.3.140.0280.00518.18
8.3.130.0170.00418.18
8.3.120.0260.00518.18
8.3.110.0260.00618.18
8.3.100.0320.00418.18
8.3.90.0270.00618.18
8.3.80.0390.00418.18
8.3.70.0240.00218.18
8.3.60.0460.00918.18
8.3.50.0410.01118.18
8.3.40.0290.00518.18
8.3.30.0320.00818.18
8.3.20.0240.00618.18
8.3.10.0220.00718.18
8.3.00.0150.00318.18
8.2.290.0110.00820.20
8.2.280.0220.00618.18
8.2.270.0300.00718.18
8.2.260.0340.00818.18
8.2.250.0320.01018.18
8.2.240.0370.00718.18
8.2.230.0260.00818.18
8.2.220.0240.00418.18
8.2.210.0220.00918.18
8.2.200.0280.00718.18
8.2.190.0310.00718.18
8.2.180.0330.00718.18
8.2.170.0410.01218.18
8.2.160.0350.00618.18
8.2.150.0320.00518.18
8.2.140.0200.00418.18
8.2.130.0310.00618.18
8.2.120.0240.00718.18
8.2.110.0240.00518.18
8.2.100.0270.00818.18
8.2.90.0210.00318.18
8.2.80.0250.00618.18
8.2.70.0300.00718.18
8.2.60.0250.00518.18
8.2.50.0270.00518.18
8.2.40.0250.00818.18
8.2.30.0250.00818.18
8.2.20.0340.00918.18
8.2.10.0330.00918.18
8.2.00.0340.00718.18

preferences:
28.72 ms | 403 KiB | 5 Q