3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = [ 'apple', 'banana' , 'cherry' ]; foreach ( $fruits as $fruit ) { // The $fruit just gets overwritten each time, so the array of $fruits never changes. $fruit = str_rot13( $fruit ); } print_r( $fruits ); foreach ( $fruits as $key => $fruit ) { // Now we're assigning the rotated string back to the original array. $fruits[ $key ] = str_rot13( $fruit ); } print_r( $fruits );

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.20.0110.00520.25
8.5.10.0100.00916.64
8.5.00.0160.00720.18
8.4.170.0110.01023.55
8.4.160.0100.01123.98
8.4.150.0020.00114.05
8.4.140.0170.00917.72
8.4.130.0120.00918.82
8.4.120.0130.00817.71
8.4.110.0100.01019.36
8.4.100.0110.01017.65
8.4.90.0100.00920.47
8.4.80.0150.00518.80
8.4.70.0130.00618.86
8.4.60.0110.00818.79
8.4.50.0150.00618.97
8.4.40.0130.00717.48
8.4.30.0130.00620.64
8.4.20.0130.00319.74
8.4.10.0110.00019.57
8.3.300.0140.00822.68
8.3.290.0150.00718.33
8.3.280.0050.01520.13
8.3.270.0090.01216.48
8.3.260.0140.00516.63
8.3.250.0060.00316.47
8.3.240.0100.00816.79
8.3.230.0100.00816.65
8.3.220.0090.00818.83
8.3.210.0120.00918.45
8.3.200.0050.00416.45
8.3.190.0060.00117.09
8.3.180.0090.01018.79
8.3.170.0150.00316.97
8.3.160.0070.01117.14
8.3.150.0040.01516.86
8.3.140.0050.00316.48
8.3.130.0060.00316.67
8.3.120.0090.00018.89
8.3.110.0080.00316.48
8.3.100.0460.00337.54
8.3.90.0380.01037.54
8.3.80.0150.01237.54
8.3.70.0210.00337.54
8.3.60.0230.00037.54
8.3.50.0290.00437.54
8.3.40.0130.00637.54
8.3.30.0110.00837.54
8.3.20.0320.00737.54
8.3.10.0310.00937.54
8.3.00.0300.01037.54
8.2.300.0130.00818.85
8.2.290.0100.00916.46
8.2.280.0110.00818.47
8.2.270.0100.01016.92
8.2.260.0110.00716.55
8.2.250.0070.01116.61
8.2.240.0040.00717.13
8.2.230.0000.00820.94
8.2.220.0240.00337.54
8.2.210.0320.00837.54
8.2.200.0290.00937.54
8.2.190.0340.00737.54
8.2.180.0290.01337.54
8.2.170.0440.01637.54
8.2.160.0250.01937.54
8.2.150.0280.00937.54
8.2.140.0380.00737.54
8.2.130.0320.00837.54
8.2.120.0490.00437.54
8.2.110.0350.00937.54
8.2.100.0370.00637.54
8.2.90.0360.00737.54
8.2.80.0370.00737.54
8.2.70.0210.01537.54
8.2.60.0310.01137.54
8.2.50.0460.00337.54
8.2.40.0320.01137.54
8.2.30.0340.00337.54
8.2.20.0200.01437.54
8.2.10.0270.00637.54
8.2.00.0370.00337.54
8.1.340.0110.01017.38
8.1.330.0080.01015.96
8.1.320.0080.00417.73
8.1.310.0000.00817.96
8.1.300.0090.00018.65
8.1.290.0340.00837.54
8.1.280.0420.00037.54
8.1.270.0400.00037.54
8.1.260.0380.00637.54
8.1.250.0350.00937.54
8.1.240.0230.01137.54
8.1.230.0280.00637.54
8.1.220.0130.01037.54
8.1.210.0360.00737.54
8.1.200.0390.00737.54
8.1.190.0340.00937.54
8.1.180.0310.01237.54
8.1.170.0290.01037.54
8.1.160.0330.00737.54
8.1.150.0270.01237.54
8.1.140.0260.01337.54
8.1.130.0300.00737.54
8.1.120.0400.00437.54
8.1.110.0300.00337.54
8.1.100.0270.00637.54
8.1.90.0250.01237.54
8.1.80.0180.02137.54
8.1.70.0300.01037.54
8.1.60.0240.01737.54
8.1.50.0340.00937.54
8.1.40.0340.00937.54
8.1.30.0260.01137.54
8.1.20.0380.00437.54
8.1.10.0330.01237.54
8.1.00.0300.00337.54

preferences:
67.28 ms | 403 KiB | 5 Q