3v4l.org

run code in 300+ PHP versions simultaneously
<?php class string { protected $value; function __construct($value){} } function foo(string $s) {} foo(new string("hello world"));

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.6.280.0030.07320.84
5.6.210.0100.07720.50
5.6.200.0100.08018.18
5.6.190.0130.07320.50
5.6.180.0230.04020.66
5.6.170.0130.05320.54
5.6.160.0100.08720.46
5.6.150.0170.05318.29
5.6.140.0100.04318.11
5.6.130.0100.04718.15
5.6.120.0130.08320.90
5.6.110.0170.06021.12
5.6.100.0130.07320.97
5.6.90.0000.05021.11
5.6.80.0100.03320.51
5.6.70.2330.03320.35
5.5.350.0270.06320.43
5.5.340.0100.06717.98
5.5.330.0070.06320.27
5.5.320.0300.04320.41
5.5.310.0200.04020.32
5.5.300.0100.05018.09
5.5.290.0100.03717.97
5.5.280.0070.07720.77
5.5.270.0070.07320.73
5.5.260.0070.05020.72
5.5.250.0000.04720.69
5.5.240.0030.08720.23
5.4.450.0200.05019.41
5.4.440.0200.04019.46
5.4.430.0200.04019.40
5.4.420.0300.07019.48
5.4.410.0170.05319.29
5.4.400.0400.04718.98
5.4.390.0230.07318.89
5.4.380.0730.04718.98
5.4.370.0330.07319.14
5.4.360.0400.07318.86
5.4.350.0270.04019.19
5.4.340.0330.06019.22
5.4.320.0430.03019.19
5.4.310.0530.06019.22
5.4.300.0330.07019.31
5.4.290.0370.03318.87
5.4.280.0370.04319.07
5.4.270.0370.06019.09
5.4.260.0370.06019.16
5.4.250.0330.04018.91
5.4.240.0470.04318.99
5.4.230.0500.06019.08
5.4.220.0470.06719.23
5.4.210.0300.07019.21
5.4.200.0370.03319.21
5.4.190.0400.06719.19
5.4.180.0470.04319.14
5.4.170.0370.03318.96
5.4.160.0430.07019.19
5.4.150.0400.05019.20
5.4.140.0430.06716.40
5.4.130.0370.07316.40
5.4.120.0400.04316.36
5.4.110.0370.06716.61
5.4.100.0430.06316.23
5.4.90.0500.05716.51
5.4.80.0330.05716.41
5.4.70.0430.06716.22
5.4.60.0430.06016.43
5.4.50.0430.04716.32
5.4.40.0430.03016.53
5.4.30.0400.06316.52
5.4.20.0330.04316.16
5.4.10.0470.06316.53
5.4.00.0300.05715.73
5.3.290.0370.05014.64
5.3.280.0370.06014.75
5.3.270.0330.04014.65
5.3.260.0430.06714.50
5.3.250.0470.04014.50
5.3.240.0430.06714.61
5.3.230.0500.06014.64
5.3.220.0400.06314.49
5.3.210.0270.05014.57
5.3.200.0330.04314.55
5.3.190.0430.06314.51
5.3.180.0430.05314.78
5.3.170.0400.04714.46
5.3.160.0470.06014.56
5.3.150.0370.03714.48
5.3.140.0430.05314.46
5.3.130.0370.07014.54
5.3.120.0370.07014.49
5.3.110.0370.04314.65
5.3.100.0500.06014.13
5.3.90.0400.03313.94
5.3.80.0430.06714.00
5.3.70.0430.06713.93
5.3.60.0430.04713.91
5.3.50.0430.06713.85
5.3.40.0300.04014.17
5.3.30.0400.03713.88
5.3.20.0270.04013.67
5.3.10.0430.06013.81
5.3.00.0400.05313.87
5.2.170.0370.05711.66
5.2.160.0330.05711.66
5.2.150.0470.05011.66
5.2.140.0370.03311.66
5.2.130.0230.03311.66
5.2.120.0470.02711.66
5.2.110.0400.05311.66
5.2.100.0400.05311.66
5.2.90.0330.06011.66
5.2.80.0300.05711.66
5.2.70.0330.02311.66
5.2.60.0370.03311.66
5.2.50.0230.03311.66
5.2.40.0300.04711.66
5.2.30.0270.04311.66
5.2.20.0370.04711.66
5.2.10.0300.04711.66
5.2.00.0270.04711.66
5.1.60.0230.03011.66
5.1.50.0130.03311.66
5.1.40.0130.03011.66
5.1.30.0230.04711.66
5.1.20.0400.04311.66
5.1.10.0330.04311.66
5.1.00.0270.02711.66
5.0.50.0100.02311.66
5.0.40.0170.02011.66
5.0.30.0230.04011.66
5.0.20.0230.03311.66
5.0.10.0200.01711.66
5.0.00.0130.05311.66
4.4.90.0170.02311.66
4.4.80.0130.02311.66
4.4.70.0170.02011.66
4.4.60.0100.02311.66
4.4.50.0200.02711.66
4.4.40.0070.03011.66
4.4.30.0130.02011.66
4.4.20.0200.01311.66
4.4.10.0130.01311.66
4.4.00.0100.02711.66
4.3.110.0130.03311.66
4.3.100.0200.01711.66
4.3.90.0170.01711.66
4.3.80.0100.04311.66
4.3.70.0130.01311.66
4.3.60.0100.03011.66
4.3.50.0170.03011.66
4.3.40.0130.02311.66
4.3.30.0070.03311.66
4.3.20.0070.01711.66
4.3.10.0100.01311.66
4.3.00.0100.03311.66

preferences:
139.54 ms | 1394 KiB | 7 Q