3v4l.org

run code in 300+ PHP versions simultaneously
<?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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0150.00018.68
8.3.50.0120.00517.41
8.3.40.0140.00718.84
8.3.30.0110.00418.84
8.3.20.0040.00418.73
8.3.10.0090.00020.67
8.3.00.0000.00817.59
8.2.180.0070.01116.50
8.2.170.0140.00322.96
8.2.160.0100.01022.14
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00926.16
8.2.120.0030.00519.95
8.2.110.0030.00721.17
8.2.100.0090.00317.84
8.2.90.0060.00319.22
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0040.00418.05
8.2.50.0090.00018.07
8.2.40.0000.00718.22
8.2.30.0040.00418.08
8.2.20.0040.00417.71
8.2.10.0000.00717.61
8.2.00.0040.00417.55
8.1.280.0060.00925.92
8.1.270.0070.00023.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00722.33
8.1.230.0040.00720.96
8.1.220.0040.00418.77
8.1.210.0000.00818.77
8.1.200.0000.00917.00
8.1.190.0060.00317.51
8.1.180.0030.00618.10
8.1.170.0050.00318.87
8.1.160.0020.00518.87
8.1.150.0070.00018.50
8.1.140.0030.00517.41
8.1.130.0060.00017.84
8.1.120.0000.00717.36
8.1.110.0070.00017.30
8.1.100.0030.00517.39
8.1.90.0050.00317.42
8.1.80.0040.00417.31
8.1.70.0040.00417.41
8.1.60.0000.00817.50
8.1.50.0050.00217.43
8.1.40.0040.00417.50
8.1.30.0030.00517.52
8.1.20.0060.00317.66
8.1.10.0040.00417.58
8.1.00.0080.00017.51
8.0.300.0080.00020.03
8.0.290.0040.00416.88
8.0.280.0000.00718.51
8.0.270.0030.00317.20
8.0.260.0070.00018.55
8.0.250.0000.00717.09
8.0.240.0080.00316.96
8.0.230.0080.00016.92
8.0.220.0000.00716.91
8.0.210.0030.00516.82
8.0.200.0000.00716.82
8.0.190.0000.00716.98
8.0.180.0040.00416.82
8.0.170.0050.00316.93
8.0.160.0050.00317.00
8.0.150.0050.00516.84
8.0.140.0050.00316.71
8.0.130.0000.00513.29
8.0.120.0000.00816.75
8.0.110.0000.00816.86
8.0.100.0000.00816.89
8.0.90.0070.00016.87
8.0.80.0130.00616.96
8.0.70.0050.00216.77
8.0.60.0030.00316.96
8.0.50.0050.00216.88
8.0.30.0110.00817.09
8.0.20.0100.00917.13
8.0.10.0040.00416.97
8.0.00.0080.01216.70
7.4.330.0000.00614.70
7.4.320.0000.00616.41
7.4.300.0000.00616.65
7.4.290.0040.00416.46
7.4.280.0030.00516.59
7.4.270.0000.00816.66
7.4.260.0000.00613.31
7.4.250.0030.00516.56
7.4.240.0050.00316.54
7.4.230.0000.00716.42
7.4.220.0090.00916.45
7.4.210.0060.01116.63
7.4.200.0030.00316.54
7.4.190.0030.00316.75
7.4.160.0140.00416.49
7.4.150.0070.01117.07
7.4.140.0100.00717.10
7.4.130.0100.00716.54
7.4.120.0110.00716.44
7.4.110.0080.01116.61
7.4.100.0040.01616.64
7.4.90.0110.00716.78
7.4.80.0110.01418.80
7.4.70.0030.01616.47
7.4.60.0060.01016.32
7.4.50.0000.00716.33
7.4.40.0120.00022.27
7.4.30.0030.01316.35
7.4.00.0070.01015.04
7.3.330.0030.00313.38
7.3.320.0000.00813.12
7.3.310.0030.00316.26
7.3.300.0000.00716.19
7.3.290.0000.01316.30
7.3.280.0070.00816.30
7.3.270.0030.01417.07
7.3.260.0120.01218.24
7.3.250.0130.00816.47
7.3.240.0070.01416.47
7.3.230.0030.01316.52
7.3.210.0110.00816.26
7.3.200.0090.00919.39
7.3.190.0170.00616.44
7.3.180.0080.01216.44
7.3.170.0060.00916.27
7.3.160.0110.00616.38
7.3.120.0090.00614.75
7.3.10.0070.01416.29
7.3.00.0140.00615.80
7.2.330.0150.00416.59
7.2.320.0110.01216.69
7.2.310.0150.00916.71
7.2.300.0060.01216.35
7.2.290.0080.01116.72
7.2.130.0100.01016.41
7.2.120.0080.01116.77
7.2.110.0090.00916.90
7.2.100.0150.00616.48
7.2.90.0100.01016.68
7.2.80.0070.01416.32
7.2.70.0060.01016.95
7.2.60.0110.00716.38
7.2.50.0130.01016.29
7.2.40.0180.00016.45
7.2.30.0180.00416.81
7.2.20.0150.00616.61
7.2.10.0160.00316.84
7.2.00.0100.00817.94
7.1.250.0060.01515.46
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

preferences:
48.16 ms | 401 KiB | 5 Q