3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait first_trait { function first_function() { echo "From First Trait\n"; } } trait second_trait { use first_trait { first_function insteadof first_trait::first_function; first_trait::first_function as second_function; } function first_function() { echo "From Second Trait\n"; } } class first_class { use second_trait; } $obj = new first_class(); // Output: From Second Trait $obj->first_function(); // Output: From First Trait $obj->second_function();

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)
5.4.110.0000.05316.46
5.4.100.0000.08016.39
5.4.90.0030.07716.50
5.4.80.0030.04716.48
5.4.70.0000.07716.52
5.4.60.0100.04716.38
5.4.50.0030.04716.30
5.4.40.0100.07016.26
5.4.30.0070.07016.43
5.4.20.0070.07316.55
5.4.10.0070.05316.40
5.4.00.0100.05715.84
5.3.210.0100.06014.43
5.3.200.0130.07014.52
5.3.190.0100.07714.50
5.3.180.0070.07714.34
5.3.170.0170.06314.50
5.3.160.0030.06014.57
5.3.150.0030.07714.51
5.3.140.0070.06714.52
5.3.130.0070.06314.37
5.3.120.0070.06014.32
5.3.110.0100.07014.38
5.3.100.0000.06014.00
5.3.90.0070.07313.92
5.3.80.0070.08013.79
5.3.70.0170.05013.96
5.3.60.0100.03713.95
5.3.50.0070.06013.92
5.3.40.0030.04714.03
5.3.30.0030.04713.99
5.3.20.0030.05713.66
5.3.10.0100.03013.58
5.3.00.0070.06713.71

preferences:
140.13 ms | 1386 KiB | 7 Q