3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $abc; function __construct() { $this->abc = function(){ echo "new function"; }; } function Bar() { echo "This is Bar"; } } $foo = new Foo(); call_user_func($foo->abc);

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.0100.01016.75
8.3.50.0090.00921.97
8.3.40.0120.00319.01
8.3.30.0100.00319.23
8.3.20.0070.00020.16
8.3.10.0040.00423.36
8.3.00.0040.00419.26
8.2.180.0040.01116.38
8.2.170.0100.00322.96
8.2.160.0100.00320.39
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0040.00422.25
8.2.110.0060.00321.96
8.2.100.0060.00617.72
8.2.90.0040.00419.05
8.2.80.0060.00317.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0040.00419.88
8.2.30.0000.00818.04
8.2.20.0040.00417.74
8.2.10.0030.00618.12
8.2.00.0000.00817.66
8.1.280.0070.00725.92
8.1.270.0030.00623.96
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00323.95
8.1.230.0060.00619.16
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.66
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0030.00322.08
8.1.150.0000.00718.64
8.1.140.0030.00617.50
8.1.130.0000.00817.76
8.1.120.0040.00417.47
8.1.110.0080.00417.35
8.1.100.0060.00317.52
8.1.90.0000.00817.48
8.1.80.0000.00817.53
8.1.70.0000.00717.34
8.1.60.0040.00417.49
8.1.50.0040.00417.54
8.1.40.0020.00517.40
8.1.30.0040.00417.61
8.1.20.0050.00317.71
8.1.10.0040.00417.55
8.1.00.0000.00717.40
8.0.300.0040.00418.77
8.0.290.0030.00317.18
8.0.280.0050.00218.47
8.0.270.0070.00017.38
8.0.260.0040.00417.31
8.0.250.0030.00716.77
8.0.240.0040.00416.91
8.0.230.0070.00016.89
8.0.220.0000.00816.73
8.0.210.0030.00316.81
8.0.200.0000.00716.97
8.0.190.0040.00416.82
8.0.180.0070.00016.88
8.0.170.0000.00716.81
8.0.160.0070.00016.91
8.0.150.0070.00016.89
8.0.140.0000.00716.84
8.0.130.0060.00013.34
8.0.120.0000.00816.86
8.0.110.0000.00716.89
8.0.100.0040.00416.99
8.0.90.0000.00816.87
8.0.80.0070.01416.83
8.0.70.0030.00416.88
8.0.60.0000.00716.82
8.0.50.0000.00716.66
8.0.30.0080.01117.07
8.0.20.0130.00717.40
8.0.10.0030.00516.89
8.0.00.0120.00416.83
7.4.330.0030.00315.04
7.4.320.0070.00016.44
7.4.300.0030.00316.49
7.4.290.0030.00316.42
7.4.280.0070.00016.41
7.4.270.0030.00316.54
7.4.260.0000.00716.50
7.4.250.0040.00416.58
7.4.240.0020.00516.53
7.4.230.0030.00316.63
7.4.220.0040.01116.52
7.4.210.0090.00616.53
7.4.200.0000.00816.68
7.4.190.0000.00716.66
7.4.160.0130.01016.25
7.4.150.0110.00717.40
7.4.140.0090.01017.86
7.4.130.0070.01216.55
7.4.120.0140.00316.58
7.4.110.0100.00716.36
7.4.100.0060.01316.42
7.4.90.0110.00716.59
7.4.80.0120.00619.39
7.4.70.0040.01416.49
7.4.60.0100.00716.36
7.4.50.0030.00516.63
7.4.40.0090.00322.77
7.4.30.0080.00816.46
7.4.00.0080.00814.91
7.3.330.0030.00313.31
7.3.320.0030.00313.31
7.3.310.0070.00016.34
7.3.300.0000.00716.26
7.3.290.0110.00416.33
7.3.280.0100.00716.31
7.3.270.0110.00717.40
7.3.260.0060.01216.58
7.3.250.0130.00516.54
7.3.240.0100.01316.54
7.3.230.0040.01316.51
7.3.210.0070.01016.53
7.3.200.0070.01419.39
7.3.190.0040.01216.27
7.3.180.0060.01016.24
7.3.170.0100.01316.30
7.3.160.0160.00016.54
7.3.120.0030.01214.76
7.3.110.0070.01115.05
7.3.100.0000.01114.67
7.3.90.0000.01414.74
7.3.80.0030.01015.13
7.3.70.0070.01014.86
7.3.60.0120.00314.64
7.3.50.0080.00814.71
7.3.40.0000.01114.61
7.3.30.0040.00414.79
7.3.20.0060.00916.61
7.3.10.0140.00016.63
7.3.00.0110.00716.75
7.2.330.0130.00316.70
7.2.320.0090.00916.77
7.2.310.0130.00316.62
7.2.300.0090.00816.43
7.2.290.0170.00416.79
7.2.250.0120.00614.90
7.2.240.0060.00915.06
7.2.230.0110.00315.13
7.2.220.0040.00914.74
7.2.210.0070.01115.37
7.2.200.0060.00914.89
7.2.190.0110.00415.18
7.2.180.0000.01315.16
7.2.170.0090.00015.11
7.2.00.0070.01119.40
7.1.330.0060.01215.81
7.1.320.0070.00715.89
7.1.310.0030.01315.83
7.1.300.0070.00315.61
7.1.290.0040.00815.83
7.1.280.0000.01015.71
7.1.270.0030.00915.55
7.1.260.0040.01415.84
7.1.100.0480.00412.25
7.1.70.0040.00417.27
7.1.60.0040.02119.46
7.1.50.0110.01116.82
7.1.00.0000.07722.46
7.0.200.0260.00714.68
7.0.140.0030.07322.10
7.0.60.0100.08019.97
7.0.50.0130.07717.88
7.0.40.0130.07720.11
7.0.30.0570.05720.11
7.0.20.0500.06320.10
7.0.10.0230.03720.22
7.0.00.0070.07320.19
5.6.210.0070.08020.49
5.6.200.0100.07718.16
5.6.190.0070.04020.61
5.6.180.0330.07720.63
5.6.170.0270.05320.39
5.6.160.0070.08720.39
5.6.150.0030.07718.25
5.6.140.0000.07018.15
5.6.130.0130.07318.29
5.6.120.0100.08021.00
5.6.110.0030.05020.91
5.6.100.0070.09320.98
5.6.90.0030.04020.98
5.6.80.0130.08320.44
5.6.70.0270.07320.51
5.5.350.0130.08020.45
5.5.340.0100.08318.09
5.5.330.0100.04020.32
5.5.320.0200.05020.30
5.5.310.0330.07320.30
5.5.300.0130.06017.95
5.5.290.0070.05717.95
5.5.280.0030.07720.78
5.5.270.0070.06320.88
5.5.260.0030.08720.88
5.5.250.0070.03720.63
5.5.240.0130.04720.20
5.4.450.1000.06019.33
5.4.440.0930.08019.54
5.4.430.0700.04719.50
5.4.420.0700.06019.59
5.4.410.1200.06319.32
5.4.400.0830.04719.27
5.4.390.1000.04718.97
5.4.380.0230.06318.75
5.4.370.0370.05018.64
5.4.360.0400.07718.62
5.4.350.0430.04318.79
5.4.340.0400.07018.80
5.4.320.0030.03912.51
5.4.310.0050.03812.50
5.4.300.0080.04112.52
5.4.290.0060.06012.49
5.4.280.0110.04812.39
5.4.270.0080.04112.39
5.4.260.0030.04112.39
5.4.250.0050.04212.39
5.4.240.0040.04112.39
5.4.230.0050.04112.38
5.4.220.0080.03712.38
5.4.210.0060.04312.38
5.4.200.0070.03912.38
5.4.190.0130.04312.38
5.4.180.0060.05512.37
5.4.170.0110.03412.39
5.4.160.0090.04312.38
5.4.150.0060.04912.38
5.4.140.0080.05912.06
5.4.130.0090.04612.05
5.4.120.0080.05212.01
5.4.110.0120.06412.00
5.4.100.0060.04112.00
5.4.90.0100.04212.00
5.4.80.0060.04012.00
5.4.70.0070.04512.00
5.4.60.0080.04412.00
5.4.50.0080.04812.00
5.4.40.0060.03711.99
5.4.30.0060.03511.98
5.4.20.0060.03511.99
5.4.10.0060.03511.98
5.4.00.0050.03811.47
5.3.290.0080.03912.80
5.3.280.0110.03912.71
5.3.270.0060.05712.72
5.3.260.0050.05812.72
5.3.250.0080.05412.72
5.3.240.0120.04912.72
5.3.230.0070.03712.71
5.3.220.0060.03812.68
5.3.210.0080.03812.68
5.3.200.0090.03512.68
5.3.190.0090.04012.68
5.3.180.0040.04212.67
5.3.170.0090.04212.67
5.3.160.0090.03612.67
5.3.150.0090.03712.67
5.3.140.0110.04612.66
5.3.130.0070.05712.66
5.3.120.0110.03812.66
5.3.110.0100.04012.66
5.3.100.0100.04512.12
5.3.90.0070.04612.11
5.3.80.0080.03612.10
5.3.70.0080.03412.10
5.3.60.0050.03912.08
5.3.50.0130.04012.04
5.3.40.0060.04912.04
5.3.30.0110.04311.98
5.3.20.0030.04511.78
5.3.10.0060.03911.73
5.3.00.0060.03711.72
5.2.170.0040.0329.22
5.2.160.0050.0299.22
5.2.150.0030.0339.22
5.2.140.0040.0329.22
5.2.130.0030.0329.18
5.2.120.0050.0339.18
5.2.110.0090.0269.18
5.2.100.0100.0279.18
5.2.90.0050.0309.18
5.2.80.0050.0319.17
5.2.70.0030.0349.17
5.2.60.0090.0289.13
5.2.50.0090.0269.09
5.2.40.0040.0299.07
5.2.30.0050.0309.05
5.2.20.0080.0269.04
5.2.10.0040.0308.94
5.2.00.0040.0318.80
5.1.60.0040.0258.09
5.1.50.0030.0278.09
5.1.40.0020.0278.07
5.1.30.0070.0238.42
5.1.20.0050.0398.44
5.1.10.0060.0358.17
5.1.00.0050.0378.16
5.0.50.0040.0286.64
5.0.40.0050.0276.50
5.0.30.0060.0396.32
5.0.20.0020.0246.28
5.0.10.0020.0246.26
5.0.00.0050.0326.25
4.4.90.0020.0184.78
4.4.80.0000.0204.75
4.4.70.0040.0154.75
4.4.60.0020.0174.76
4.4.50.0040.0154.77
4.4.40.0030.0264.71
4.4.30.0030.0154.76
4.4.20.0020.0174.84
4.4.10.0050.0144.85
4.4.00.0050.0264.76
4.3.110.0050.0164.67
4.3.100.0070.0184.67
4.3.90.0040.0224.64
4.3.80.0060.0324.59
4.3.70.0030.0214.63
4.3.60.0050.0144.63
4.3.50.0040.0154.62
4.3.40.0030.0324.54
4.3.30.0050.0163.30
4.3.20.0020.0183.28
4.3.10.0010.0193.24
4.3.00.0100.01710.53

preferences:
49.51 ms | 401 KiB | 5 Q