3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { static private $fn; static public function reg() { $x = new foo; self::$fn = function () use ($x) { $x->bar(); }; } public function baz() { (self::$fn)(); } private function bar() { echo 'bar'; } } foo::reg(); $foo = new foo; $foo->baz();

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.88
8.3.50.0100.00821.21
8.3.40.0080.00818.75
8.3.30.0040.01118.84
8.3.20.0050.00220.21
8.3.10.0040.00421.95
8.3.00.0040.00421.77
8.2.180.0070.00716.32
8.2.170.0070.00722.96
8.2.160.0110.00419.47
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00421.04
8.2.120.0040.00426.35
8.2.110.0050.00520.88
8.2.100.0110.00017.80
8.2.90.0030.00519.05
8.2.80.0080.00017.97
8.2.70.0030.00617.48
8.2.60.0030.00517.55
8.2.50.0040.00418.09
8.2.40.0040.00422.22
8.2.30.0000.00719.47
8.2.20.0090.00017.60
8.2.10.0040.00418.06
8.2.00.0000.00717.93
8.1.280.0170.00325.92
8.1.270.0060.00322.10
8.1.260.0030.00528.09
8.1.250.0040.00428.09
8.1.240.0060.00324.02
8.1.230.0090.00317.45
8.1.220.0050.00517.78
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00618.50
8.1.160.0000.00720.73
8.1.150.0030.00319.02
8.1.140.0080.00019.49
8.1.130.0070.00017.71
8.1.120.0000.00717.38
8.1.110.0040.00417.43
8.1.100.0030.00317.37
8.1.90.0040.00417.47
8.1.80.0040.00417.43
8.1.70.0030.00317.47
8.1.60.0030.00517.60
8.1.50.0030.00617.56
8.1.40.0030.00517.52
8.1.30.0040.00417.62
8.1.20.0040.00417.61
8.1.10.0030.00517.59
8.1.00.0040.00417.48
8.0.300.0080.00018.77
8.0.290.0030.00616.75
8.0.280.0040.00418.33
8.0.270.0000.00717.16
8.0.260.0060.00017.17
8.0.250.0030.00316.95
8.0.240.0000.00717.01
8.0.230.0000.00716.83
8.0.220.0030.00316.88
8.0.210.0000.00716.95
8.0.200.0030.00316.87
8.0.190.0040.00417.01
8.0.180.0040.00416.91
8.0.170.0050.00316.83
8.0.160.0040.00416.89
8.0.150.0000.00816.93
8.0.140.0000.00716.79
8.0.130.0080.00013.41
8.0.120.0000.00816.90
8.0.110.0040.00416.74
8.0.100.0040.00417.02
8.0.90.0040.00416.86
8.0.80.0070.01016.89
8.0.70.0040.00416.70
8.0.60.0000.00716.92
8.0.50.0040.00416.72
8.0.30.0090.01017.07
8.0.20.0080.01117.40
8.0.10.0040.00416.91
8.0.00.0110.00916.78
7.4.330.0020.00216.79
7.4.320.0060.00016.62
7.4.300.0080.00016.62
7.4.290.0060.00316.54
7.4.280.0040.00416.61
7.4.270.0040.00416.51
7.4.260.0000.00716.41
7.4.250.0040.00416.57
7.4.240.0000.00716.62
7.4.230.0000.00816.63
7.4.220.0150.00316.70
7.4.210.0060.00916.60
7.4.200.0030.00316.60
7.4.160.0150.00416.68
7.4.150.0140.00317.40
7.4.140.0130.00517.86
7.4.130.0080.01216.62
7.4.120.0090.00916.62
7.4.110.0120.00616.45
7.4.100.0130.00416.64
7.4.90.0100.00716.41
7.4.80.0090.01219.39
7.4.70.0070.01516.71
7.4.60.0060.01216.52
7.4.50.0100.00716.32
7.4.40.0060.01116.43
7.4.30.0090.01216.52
7.4.00.0080.01114.96
7.3.330.0060.00013.28
7.3.320.0000.00613.18
7.3.310.0000.00716.37
7.3.300.0030.00316.36
7.3.290.0000.00716.31
7.3.280.0110.00516.27
7.3.270.0110.00717.40
7.3.260.0080.01116.45
7.3.250.0040.01416.23
7.3.240.0060.01316.39
7.3.230.0110.00716.39
7.3.210.0130.01316.48
7.3.200.0120.00619.39
7.3.190.0120.00616.39
7.3.180.0090.01216.43
7.3.170.0090.00916.41
7.3.160.0080.00816.58
7.3.120.0040.01214.84
7.3.110.0110.00615.06
7.3.100.0060.00914.73
7.3.90.0000.01314.91
7.3.80.0060.00914.87
7.3.70.0090.00614.86
7.3.60.0120.00614.88
7.3.50.0100.00314.95
7.3.40.0030.01014.73
7.3.30.0080.00614.67
7.3.20.0070.00416.54
7.3.10.0070.00616.46
7.3.00.0050.00716.53
7.2.330.0140.00416.74
7.2.320.0030.01416.82
7.2.310.0100.00716.86
7.2.300.0110.01116.44
7.2.290.0030.01916.84
7.2.250.0000.01715.23
7.2.240.0060.00914.77
7.2.230.0100.00715.23
7.2.220.0060.00914.87
7.2.210.0030.01615.08
7.2.200.0090.00614.75
7.2.190.0070.00715.00
7.2.180.0080.00815.18
7.2.170.0120.00315.16
7.2.160.0000.01315.00
7.2.150.0060.00316.91
7.2.140.0030.01016.72
7.2.130.0110.00516.92
7.2.120.0060.00816.80
7.2.110.0050.01116.84
7.2.100.0100.00616.75
7.2.90.0070.00916.87
7.2.80.0070.01016.65
7.2.70.0080.01116.82
7.2.60.0070.00916.78
7.2.50.0050.01116.90
7.2.40.0070.00616.83
7.2.30.0070.00716.87
7.2.20.0010.01416.69
7.2.10.0030.01216.69
7.2.00.0100.00717.68
7.1.330.0060.01015.77
7.1.320.0030.01115.79
7.1.310.0070.01015.64
7.1.300.0060.00615.67
7.1.290.0000.01315.52
7.1.280.0070.00715.68
7.1.270.0090.00915.75
7.1.260.0040.00715.78
7.1.250.0020.01015.56
7.1.240.0040.01115.65
7.1.230.0030.00715.69
7.1.220.0060.00315.75
7.1.210.0030.01415.75
7.1.200.0090.00315.83
7.1.190.0030.00715.68
7.1.180.0030.01315.84
7.1.170.0030.01015.86
7.1.160.0130.00315.78
7.1.150.0030.00915.86
7.1.140.0090.00015.69
7.1.130.0040.00815.73
7.1.120.0080.00615.63
7.1.110.0050.00515.75
7.1.100.0080.00517.05
7.1.90.0030.00915.70
7.1.80.0060.00615.75
7.1.70.0050.00616.37
7.1.60.0080.01117.54
7.1.50.0070.00316.24
7.1.40.0040.01215.52
7.1.30.0000.01515.72
7.1.20.0030.01015.60
7.1.10.0040.00415.94
7.1.00.0030.04119.10
7.0.330.0030.00715.35
7.0.320.0030.00915.30
7.0.310.0000.01115.04
7.0.300.0040.00415.31
7.0.290.0070.00715.02
7.0.280.0110.00315.36
7.0.270.0120.00315.07
7.0.260.0030.01015.14
7.0.250.0060.00315.25
7.0.240.0060.00915.14
7.0.230.0060.00315.45
7.0.220.0040.00415.55
7.0.210.0000.01415.32
7.0.200.0170.00514.95
7.0.190.0040.01115.44
7.0.180.0110.00315.46
7.0.170.0030.01215.32
7.0.160.0060.01015.47
7.0.150.0090.00615.22
7.0.140.0060.00315.45
7.0.130.0080.00415.43
7.0.120.0090.00315.45
7.0.110.0100.00015.18
7.0.100.0040.01115.42
7.0.90.0040.01115.37
7.0.80.0000.01115.20
7.0.70.0000.01315.37
7.0.60.0090.02418.37
7.0.50.0020.03216.74
7.0.40.0020.05216.69
7.0.30.0220.04216.79
7.0.20.0120.04816.69
7.0.10.0060.04016.76
7.0.00.0120.04016.87
5.6.400.0040.00414.30
5.6.390.0060.00614.12
5.6.380.0030.00914.32
5.6.370.0000.00914.11
5.6.360.0070.00314.33
5.6.350.0030.00913.94
5.6.340.0030.00914.34
5.6.330.0060.00914.17
5.6.320.0080.00014.40
5.6.310.0030.01214.23
5.6.300.0040.00714.39
5.6.290.0040.01114.14
5.6.280.0030.02917.68
5.6.270.0060.00814.32
5.6.260.0040.00814.30
5.6.250.0060.00914.07
5.6.240.0090.00614.28
5.6.230.0090.00314.04
5.6.220.0070.00314.13
5.6.210.0130.03517.40
5.6.200.0090.02416.20
5.6.190.0100.04517.36
5.6.180.0120.04417.29
5.6.170.0150.04517.30
5.6.160.0080.02717.20
5.6.150.0070.02016.23
5.6.140.0030.03316.18
5.6.130.0080.03516.24
5.6.120.0070.03617.44
5.6.110.0070.03017.58
5.6.100.0060.04617.55
5.6.90.0050.02317.64
5.6.80.0100.03617.30
5.6.70.0030.00614.28
5.6.60.0080.00314.09
5.6.50.0070.00713.81
5.6.40.0070.01013.87
5.6.30.0050.00313.79
5.6.20.0000.01113.96
5.6.10.0030.00813.85
5.6.00.0070.00713.87
5.5.380.0130.00313.78
5.5.370.0100.00613.91
5.5.360.0050.00514.57
5.5.350.0030.02317.10
5.5.340.0050.02816.13
5.5.330.0070.02517.39
5.5.320.0200.03217.21
5.5.310.0140.03917.23
5.5.300.0030.02915.97
5.5.290.0020.04716.14
5.5.280.0070.03817.33
5.5.270.0050.04717.27
5.5.260.0030.04117.53
5.5.250.0050.02217.27
5.5.240.0180.03517.12
5.5.230.0030.01013.89
5.5.220.0090.00613.82
5.5.210.0060.00613.97
5.5.200.0070.01114.09
5.5.190.0030.00914.03
5.5.180.0120.00313.86
5.5.170.0030.00713.82
5.5.160.0030.01014.06
5.5.150.0050.00314.16
5.5.140.0030.00914.16
5.5.130.0080.00814.02
5.5.120.0030.01013.97
5.5.110.0090.00014.06
5.5.100.0100.00314.13
5.5.90.0000.00914.02
5.5.80.0000.01414.07
5.5.70.0070.00713.80
5.5.60.0060.00314.09
5.5.50.0080.00613.78
5.5.40.0000.01014.07
5.5.30.0060.00613.90
5.5.20.0030.01014.13
5.5.10.0030.01213.99
5.5.00.0100.00613.69

preferences:
67.17 ms | 401 KiB | 5 Q