3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace MyProject { const CONNECT_OK = 1; class Connection { static public function start() { echo 'started'; } } function connect() { /* ... */ } } namespace { // global code echo phpversion(); session_start(); $a = MyProject\connect(); echo MyProject\Connection::start(); }

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0140.00316.43
7.3.00.0040.00716.70
7.2.130.0060.00616.79
7.2.120.0090.00616.87
7.2.110.0000.01717.02
7.2.100.0070.00717.05
7.2.90.0030.01416.96
7.2.80.0080.00417.14
7.2.70.0060.00916.88
7.2.60.0050.00916.79
7.2.50.0080.00817.02
7.2.40.0070.00716.99
7.2.30.0120.00616.76
7.2.20.0090.00916.80
7.2.10.0040.01116.91
7.2.00.0050.00618.15
7.1.250.0080.00415.78
7.1.240.0030.01315.80
7.1.230.0110.00415.66
7.1.220.0070.00715.51
7.1.210.0040.01115.68
7.1.200.0080.00315.57
7.1.190.0040.00815.64
7.1.180.0070.00715.71
7.1.170.0050.00815.59
7.1.160.0000.01315.70
7.1.150.0030.01015.84
7.1.140.0090.00615.44
7.1.130.0040.01115.54
7.1.120.0090.00315.77
7.1.110.0040.01115.86
7.1.100.0040.00716.75
7.1.90.0100.00315.84
7.1.80.0050.00515.39
7.1.70.0000.01016.35
7.1.60.0100.01017.53
7.1.50.0110.00416.13
7.1.40.0120.00315.80
7.1.30.0070.00315.62
7.1.20.0100.00315.73
7.1.10.0060.00615.63
7.1.00.0030.04419.10
7.0.330.0040.01115.31
7.0.320.0040.00815.23
7.0.310.0040.01115.33
7.0.300.0030.00615.01
7.0.290.0100.00315.32
7.0.280.0030.01315.38
7.0.270.0070.00315.39
7.0.260.0060.01015.04
7.0.250.0070.00315.47
7.0.240.0080.00315.07
7.0.230.0130.00815.48
7.0.220.0100.00915.11
7.0.210.0120.00615.14
7.0.200.0130.00215.97
7.0.190.0190.00615.20
7.0.180.0140.00015.38
7.0.170.0040.01515.43
7.0.160.0060.01015.36
7.0.150.0080.00615.11
7.0.140.0070.04018.66
7.0.130.0120.00315.39
7.0.120.0060.03318.68
7.0.110.0020.04618.72
7.0.100.0090.03618.70
7.0.90.0000.04718.71
7.0.80.0030.04018.80
7.0.70.0050.03618.66
7.0.60.0060.03918.68
7.0.50.0020.04318.72
7.0.40.0020.04317.63
7.0.30.0050.04117.65
7.0.20.0020.04317.68
7.0.10.0060.03417.82
7.0.00.0020.04517.76
5.6.380.0030.00714.52
5.6.370.0000.01214.54
5.6.360.0100.00614.19
5.6.350.0000.01514.58
5.6.340.0030.01114.32
5.6.330.0100.00613.95
5.6.320.0060.00614.14
5.6.310.0070.00414.39
5.6.300.0090.00014.09
5.6.290.0000.01314.32
5.6.280.0060.04017.58
5.6.270.0030.00614.30
5.6.260.0100.03017.61
5.6.250.0070.03417.80
5.6.240.0080.02517.56
5.6.230.0030.04517.51
5.6.220.0030.04217.73
5.6.210.0030.04117.67
5.6.200.0050.03317.72
5.6.190.0040.04417.59
5.6.180.0100.03317.59
5.6.170.0020.04217.59
5.6.160.0030.03317.49
5.6.150.0050.04317.66
5.6.140.0060.04117.60
5.6.130.0050.04217.61
5.6.120.0020.04717.66
5.6.110.0130.03517.55
5.6.100.0030.03517.65
5.6.90.0090.03617.49
5.6.80.0090.03617.35
5.6.70.0070.02817.18
5.6.60.0030.02217.09
5.6.50.0070.03817.41
5.6.40.0070.02717.44
5.6.30.0030.03817.40
5.6.20.0080.03717.32
5.6.10.0050.04217.47
5.6.00.0040.03617.15
5.5.380.0020.04214.41
5.5.370.0080.03314.45
5.5.360.0020.03514.47
5.5.350.0020.03814.32
5.5.340.0050.03614.60
5.5.330.0020.04014.63
5.5.320.0030.03614.54
5.5.310.0020.04214.47
5.5.300.0000.04314.48
5.5.290.0040.03814.52
5.5.280.0070.03314.53
5.5.270.0050.04314.76
5.5.260.0040.03714.66
5.5.250.0050.03514.50
5.5.240.0030.03714.23
5.5.230.0070.03014.22
5.5.220.0020.02114.16
5.5.210.0050.02514.20
5.5.200.0050.02514.28
5.5.190.0000.04014.24
5.5.180.0020.03814.18
5.5.170.0000.01311.04
5.5.160.0060.03314.10
5.5.150.0020.03814.19
5.5.140.0050.03314.19
5.5.130.0050.03814.33
5.5.120.0000.03914.14
5.5.110.0080.03214.09
5.5.100.0070.03214.10
5.5.90.0020.03814.27
5.5.80.0030.03813.98
5.5.70.0030.04014.30
5.5.60.0060.03514.16
5.5.50.0030.03514.20
5.5.40.0000.03614.09
5.5.30.0050.03514.21
5.5.20.0050.03314.23
5.5.10.0040.03814.31
5.5.00.0070.03814.16
5.4.450.0070.03715.23
5.4.440.0040.03415.40
5.4.430.0030.03015.19
5.4.420.0050.03715.22
5.4.410.0050.03315.24
5.4.400.0030.03514.94
5.4.390.0020.02115.15
5.4.380.0040.01514.89
5.4.370.0050.02214.87
5.4.360.0000.04214.91
5.4.350.0000.04115.02
5.4.340.0050.03714.86
5.4.330.0030.00311.20
5.4.320.0050.03114.99
5.4.310.0080.02814.98
5.4.300.0050.03714.91
5.4.290.0030.03814.97
5.4.280.0030.03715.15
5.4.270.0030.03815.13
5.4.260.0080.03315.03
5.4.250.0060.03615.05
5.4.240.0070.03214.91
5.4.230.0020.03814.95
5.4.220.0140.02514.98
5.4.210.0030.04015.10
5.4.200.0050.03315.02
5.4.190.0050.03215.03
5.4.180.0070.02814.97
5.4.170.0060.03715.01
5.4.160.0030.03315.06
5.4.150.0050.03714.95
5.4.140.0090.03213.74
5.4.130.0020.03113.71
5.4.120.0040.03413.63
5.4.110.0030.03313.87
5.4.100.0000.03213.87
5.4.90.0050.03513.82
5.4.80.0080.02813.81
5.4.70.0030.03213.81
5.4.60.0040.03013.63
5.4.50.0020.03813.74
5.4.40.0080.03013.68
5.4.30.0020.03713.71
5.4.20.0000.03513.79
5.4.10.0050.03213.84
5.4.00.0080.02813.46
5.3.290.0020.03112.63
5.3.280.0020.03012.46
5.3.270.0040.03612.63
5.3.260.0030.03412.58
5.3.250.0030.03312.68
5.3.240.0050.02612.59
5.3.230.0020.03412.58
5.3.220.0060.03512.51
5.3.210.0050.03512.48
5.3.200.0020.03512.38
5.3.190.0060.03112.56
5.3.180.0030.02812.63
5.3.170.0070.03312.62
5.3.160.0020.03012.63
5.3.150.0050.03712.48
5.3.140.0050.03612.69
5.3.130.0050.03512.50
5.3.120.0030.03212.60
5.3.110.0050.03612.59
5.3.100.0050.03312.36
5.3.90.0000.03812.40
5.3.80.0030.03412.30
5.3.70.0030.03012.33
5.3.60.0070.03312.30
5.3.50.0040.03012.29
5.3.40.0030.03512.24
5.3.30.0020.03612.20
5.3.20.0020.03412.10
5.3.10.0050.03212.05
5.3.00.0050.03512.07
5.2.170.0050.02210.03
5.2.160.0050.02210.03
5.2.150.0000.03010.27
5.2.140.0070.02310.16
5.2.130.0030.0259.98
5.2.120.0060.0279.91
5.2.110.0010.02510.07
5.2.100.0030.02710.27
5.2.90.0040.02410.11
5.2.80.0050.03010.17
5.2.70.0040.02510.11
5.2.60.0050.02810.01
5.2.50.0030.0279.97
5.2.40.0020.0299.93
5.2.30.0000.03310.03
5.2.20.0050.0269.94
5.2.10.0060.0229.95
5.2.00.0070.0229.94
5.1.60.0050.0239.11
5.1.50.0080.0219.14
5.1.40.0030.0259.16
5.1.30.0050.0259.46
5.1.20.0040.0289.35
5.1.10.0060.0219.16
5.1.00.0030.0219.02
5.0.50.0120.0138.85
5.0.40.0020.0228.85
5.0.30.0090.0288.85
5.0.20.0060.0178.85
5.0.10.0040.0188.85
5.0.00.0030.0308.85
4.4.90.0030.0128.85
4.4.80.0000.0178.85
4.4.70.0050.0138.85
4.4.60.0000.0178.85
4.4.50.0000.0208.85
4.4.40.0030.0268.85
4.4.30.0010.0178.85
4.4.20.0030.0158.85
4.4.10.0030.0178.85
4.4.00.0030.0188.85
4.3.110.0030.0188.85
4.3.100.0040.0168.85
4.3.90.0010.0148.85
4.3.80.0070.0208.85
4.3.70.0060.0128.85
4.3.60.0030.0178.85
4.3.50.0020.0128.85
4.3.40.0020.0248.85
4.3.30.0010.0188.85
4.3.20.0020.0178.85
4.3.10.0030.0178.85
4.3.00.0020.0208.85