3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function foo() { if (isset($this)) { echo '$this is defined ('; echo get_class($this); echo ")\n"; } else { echo "\$this is not defined.\n"; } } } // this will print '$this is defined (A)' $a = new A(); $a->foo(); // what does this print? A::foo();

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.0rc40.0130.00698.97
7.3.0rc30.0100.00516.40
7.3.0beta10.0060.00012.79
7.3.0alpha10.0040.00412.77
7.2.60.0040.01116.45
7.2.00.0090.00619.32
7.1.200.0030.00915.83
7.1.100.0070.00417.60
7.1.70.0000.00817.18
7.1.60.0060.01919.40
7.1.50.0070.00416.93
7.1.00.0030.06022.34
7.0.200.0030.00716.70
7.0.140.0030.07321.97
7.0.60.0130.05720.04
7.0.50.0070.05017.88
7.0.40.0070.04720.05
7.0.30.0270.04320.24
7.0.20.0130.04720.07
7.0.10.0070.06020.21
7.0.00.0030.07020.25
5.6.280.0000.05020.85
5.6.210.0030.07320.57
5.6.200.0070.04018.16
5.6.190.0070.07320.58
5.6.180.0370.05020.75
5.6.170.0170.04720.50
5.6.160.0070.07720.51
5.6.150.0130.07718.23
5.6.140.0170.06718.14
5.6.130.0170.07018.22
5.6.120.0000.04321.02
5.6.110.0000.04321.03
5.6.100.0070.06721.09
5.6.90.0030.09320.95
5.6.80.0070.06720.52
5.5.350.0000.04320.45
5.5.340.0070.07018.04
5.5.330.0070.07020.33
5.5.320.1670.04020.27
5.5.310.0200.04320.35
5.5.300.0030.04318.04
5.5.290.0170.07017.98
5.5.280.0170.07320.65
5.5.270.0100.08020.86
5.5.260.0070.08720.73
5.5.250.0070.07320.66
5.5.240.0030.08020.04
5.4.450.0400.04319.57
5.4.440.0800.04319.45
5.4.430.0730.04319.29
5.4.420.0870.03719.50
5.4.410.0330.04719.41
5.4.400.0500.05019.21
5.4.390.0630.04719.01
5.4.380.0500.04319.09
5.4.370.0570.03719.20
5.4.360.0370.05019.22
5.4.350.0500.03719.21
5.4.340.0300.04719.00
5.4.320.0570.03718.94
5.4.310.0470.04718.95
5.4.300.0470.04719.23
5.4.290.0700.04019.33
5.4.280.0570.04318.91
5.4.270.0470.03319.09
5.4.260.0670.03319.21
5.4.250.0400.04718.85
5.4.240.1030.05019.19
5.4.230.0900.04019.03
5.4.220.0670.04019.12
5.4.210.0630.03019.31
5.4.200.0600.04019.30
5.4.190.0870.03719.23
5.4.180.0430.04019.06
5.4.170.1070.03319.18
5.4.160.0870.03318.84
5.4.150.0830.04318.84
5.4.140.0870.02716.53
5.4.130.0900.03716.52
5.4.120.0300.03316.40
5.4.110.0830.03016.24
5.4.100.0600.03716.51
5.4.90.0970.04316.56
5.4.80.0570.04016.54
5.4.70.1100.03316.36
5.4.60.0800.04016.49
5.4.50.0630.03316.43
5.4.40.0830.03016.53
5.4.30.0230.04016.24
5.4.20.0600.02716.32
5.4.10.0730.04016.45
5.4.00.0200.04315.93
5.3.290.0430.04015.93
5.3.280.0530.04015.93
5.3.270.0600.04015.93
5.3.260.0370.04015.93
5.3.250.0800.03015.93
5.3.240.0870.03015.93
5.3.230.0630.03315.93
5.3.220.0830.04315.93
5.3.210.0430.03715.93
5.3.200.0400.04315.93
5.3.190.0330.04015.93
5.3.180.0470.03715.93
5.3.170.0570.03715.93
5.3.160.0770.02715.93
5.3.150.0600.04015.93
5.3.140.0400.05015.93
5.3.130.0600.04315.93
5.3.120.0670.04015.93
5.3.110.0430.04015.93
5.3.100.0200.04015.93
5.3.90.0600.03715.93
5.3.80.0770.03015.93
5.3.70.0570.03315.93
5.3.60.0370.03715.93
5.3.50.1000.03315.93
5.3.40.0300.03715.93
5.3.30.0230.04315.93
5.3.20.0600.03315.93
5.3.10.1000.02715.93
5.3.00.0370.03715.93
5.2.170.0430.02715.93
5.2.160.0500.03015.93
5.2.150.0600.04315.93
5.2.140.0670.03315.93
5.2.130.0470.03015.93
5.2.120.0430.03315.93
5.2.110.0170.03315.93
5.2.100.0370.03015.93
5.2.90.0670.03015.93
5.2.80.0370.04015.93
5.2.70.0670.03015.93
5.2.60.0630.02715.93
5.2.50.0530.02715.93
5.2.40.0470.02315.93
5.2.30.0600.02315.93
5.2.20.0570.02715.93
5.2.10.0600.02715.93
5.2.00.0330.03015.93
5.1.60.0370.03015.93
5.1.50.0300.02015.93
5.1.40.0400.02715.93
5.1.30.0370.02315.93
5.1.20.0330.03315.93
5.1.10.0500.02315.93
5.1.00.0670.01315.93
5.0.50.0300.04315.93
5.0.40.0330.01715.93
5.0.30.0170.03315.93
5.0.20.0100.02015.93
5.0.10.0170.02015.93
5.0.00.0100.03315.93
4.4.90.0100.01315.93
4.4.80.0230.01315.93
4.4.70.0170.01315.93
4.4.60.0070.02015.93
4.4.50.0130.01015.93
4.4.40.0300.02315.93
4.4.30.0170.01715.93
4.4.20.0130.01715.93
4.4.10.0170.01715.93
4.4.00.0330.02015.93
4.3.110.0070.01715.93
4.3.100.0070.01715.93
4.3.90.0170.02015.93
4.3.80.0000.02015.93
4.3.70.0170.01315.93
4.3.60.0270.01015.93
4.3.50.0300.01715.93
4.3.40.0270.03015.93
4.3.30.0200.01015.93
4.3.20.0030.01715.93
4.3.10.0030.02015.93
4.3.00.0070.02015.93