3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public static function bar() { } public function getStaticClosure() { return static function() {}; } public function getClosure() { return function() { var_dump($this); }; } } $foo = new foo; $reflectionInstance = new ReflectionFunction($foo->getClosure()); var_dump($reflectionInstance->getClosureThis()); $reflectionStatic = new ReflectionFunction($foo->getStaticClosure()); var_dump($reflectionStatic->getClosureThis());

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.0070.00718.05
8.3.50.0060.01017.93
8.3.40.0040.01118.45
8.3.30.0100.00319.04
8.3.20.0140.00020.20
8.3.10.0090.00621.92
8.3.00.0040.00419.56
8.2.180.0180.00325.92
8.2.170.0170.00318.91
8.2.160.0110.00722.96
8.2.150.0030.01425.66
8.2.140.0030.00524.66
8.2.130.0090.00926.16
8.2.120.0080.00020.54
8.2.110.0030.00619.18
8.2.100.0040.00817.91
8.2.90.0040.00417.84
8.2.80.0040.00419.11
8.2.70.0080.00017.61
8.2.60.0000.00817.92
8.2.50.0060.00318.10
8.2.40.0040.00420.39
8.2.30.0020.00518.13
8.2.20.0040.00417.67
8.2.10.0070.00018.01
8.2.00.0040.00517.62
8.1.270.0080.00022.20
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00323.88
8.1.230.0070.00422.82
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0000.01017.23
8.1.180.0000.00818.10
8.1.170.0000.00918.44
8.1.160.0030.00522.14
8.1.150.0080.00018.80
8.1.140.0070.00017.38
8.1.130.0000.00717.83
8.1.120.0030.00417.33
8.1.110.0060.00317.46
8.1.100.0000.00717.43
8.1.90.0070.00017.47
8.1.80.0050.00317.51
8.1.70.0000.00717.29
8.1.60.0050.00317.46
8.1.50.0050.00317.51
8.1.40.0040.00417.47
8.1.30.0000.00917.61
8.1.20.0000.00717.49
8.1.10.0040.00417.45
8.1.00.0070.00017.38
8.0.300.0070.00020.09
8.0.290.0040.00416.75
8.0.280.0000.00718.43
8.0.270.0030.00317.10
8.0.260.0030.00317.20
8.0.250.0030.00316.80
8.0.240.0050.00216.89
8.0.230.0060.00316.85
8.0.220.0050.00316.86
8.0.210.0030.00616.77
8.0.200.0000.00816.88
8.0.190.0040.00416.90
8.0.180.0000.00716.80
8.0.170.0040.00416.86
8.0.160.0000.00716.88
8.0.150.0000.00716.78
8.0.140.0030.00516.73
8.0.130.0030.00313.40
8.0.120.0000.00816.73
8.0.110.0040.00416.89
8.0.100.0000.00816.90
8.0.90.0030.00316.87
8.0.80.0100.00516.90
8.0.70.0000.00716.68
8.0.60.0000.00716.78
8.0.50.0060.00316.93
8.0.30.0110.00916.92
8.0.20.0070.01317.40
8.0.10.0040.00417.06
8.0.00.0110.00916.62
7.4.330.0050.00015.23
7.4.320.0030.00316.60
7.4.300.0030.00316.44
7.4.290.0030.00316.57
7.4.280.0000.00816.38
7.4.270.0000.00816.40
7.4.260.0030.00316.59
7.4.250.0020.00516.55
7.4.240.0040.00416.45
7.4.230.0000.00716.67
7.4.220.0090.00916.52
7.4.210.0100.00716.46
7.4.200.0000.00716.29
7.4.150.0060.01317.40
7.4.140.0090.01417.86
7.4.130.0090.00916.52
7.4.120.0070.01216.50
7.4.110.0090.00916.30
7.4.100.0120.00916.44
7.4.90.0170.00016.50
7.4.80.0140.00719.39
7.4.70.0030.01916.46
7.4.60.0060.01016.47
7.4.50.0060.00316.54
7.4.40.0100.00616.61
7.4.30.0110.01116.66
7.4.00.0030.01314.92
7.3.330.0000.00613.30
7.3.320.0000.00513.16
7.3.310.0050.00216.27
7.3.300.0000.00716.13
7.3.290.0110.00616.32
7.3.280.0130.00316.27
7.3.270.0030.01417.40
7.3.260.0100.00616.24
7.3.250.0110.00816.45
7.3.240.0080.00816.30
7.3.230.0070.01016.53
7.3.210.0030.01416.25
7.3.200.0090.00919.39
7.3.190.0060.01216.25
7.3.180.0110.00416.63
7.3.170.0090.00916.27
7.3.160.0060.00916.50
7.3.10.0030.00816.60
7.3.00.0090.00916.40
7.2.330.0000.01816.70
7.2.320.0140.00316.63
7.2.310.0090.00916.41
7.2.300.0080.00816.38
7.2.290.0140.00916.54
7.2.130.0160.00316.80
7.2.120.0120.00616.59
7.2.110.0070.00716.92
7.2.100.0030.00916.68
7.2.90.0130.00316.83
7.2.80.0050.00616.61
7.2.70.0140.00316.88
7.2.60.0020.01116.88
7.2.50.0130.00617.13
7.2.40.0090.00616.95
7.2.30.0030.01017.06
7.2.20.0030.00917.05
7.2.10.0030.00616.89
7.2.00.0050.01018.13
7.1.250.0030.00615.68
7.1.240.0030.00615.68
7.1.230.0100.00715.79
7.1.220.0070.00315.78
7.1.210.0050.00515.57
7.1.200.0080.00615.69
7.1.190.0090.00615.74
7.1.180.0030.00915.47
7.1.170.0090.00915.43
7.1.160.0070.00315.59
7.1.150.0090.00615.86
7.1.140.0030.00915.55
7.1.130.0070.00715.31
7.1.120.0070.00715.66
7.1.110.0070.00715.64
7.1.100.0030.01016.78
7.1.90.0000.01315.80
7.1.80.0000.01015.61
7.1.70.0050.00316.41
7.1.60.0100.01017.51
7.1.50.0000.01416.16
7.1.40.0070.01015.73
7.1.30.0090.00615.71
7.1.20.0030.00715.61
7.1.10.0110.00715.66
7.1.00.0030.04318.99
7.0.330.0070.00715.33
7.0.320.0070.00715.12
7.0.310.0060.00315.34
7.0.300.0090.00615.09
7.0.290.0110.00715.21
7.0.280.0060.00615.26
7.0.270.0120.00415.07
7.0.260.0090.00315.23
7.0.250.0060.00615.14
7.0.240.0040.00715.09
7.0.230.0060.00715.28
7.0.220.0100.00315.42
7.0.210.0040.00815.35
7.0.200.0090.00514.97
7.0.190.0060.00615.42
7.0.180.0000.00915.30
7.0.170.0030.00715.41
7.0.160.0110.00415.53
7.0.150.0100.00315.34
7.0.140.0080.03918.55
7.0.130.0030.01015.01
7.0.120.0030.01315.00
7.0.110.0060.00915.45
7.0.100.0060.00615.22
7.0.90.0100.00315.39
7.0.80.0040.00715.42
7.0.70.0000.01215.25
7.0.60.0030.04717.54
7.0.50.0030.03316.65
7.0.40.0080.04316.80
7.0.30.0310.02316.81
7.0.20.0200.04016.59
7.0.10.0070.04716.58
7.0.00.0080.04816.85
5.6.380.0060.00514.21
5.6.370.0030.01014.31
5.6.360.0000.00914.52
5.6.350.0090.00614.20
5.6.340.0110.00514.23
5.6.330.0030.01314.13
5.6.320.0060.00914.21
5.6.310.0070.01214.36
5.6.300.0140.00614.39
5.6.290.0090.01014.06
5.6.280.0110.03617.62
5.6.270.0110.00714.59
5.6.260.0110.00614.28
5.6.250.0040.01114.45
5.6.240.0060.00614.19
5.6.230.0090.00914.22
5.6.220.0060.00914.56
5.6.210.0120.03317.50
5.6.200.0070.04416.23
5.6.190.0090.04617.38
5.6.180.0180.04317.43
5.6.170.0200.02217.37
5.6.160.0040.02917.27
5.6.150.0060.02316.39
5.6.140.0090.02416.32
5.6.130.0040.03616.15
5.6.120.0070.05217.65
5.6.110.0060.02617.59
5.6.100.0090.03917.62
5.6.90.0150.04417.79
5.6.80.0150.03817.37
5.6.70.0110.01114.27
5.6.60.0140.00314.20
5.6.50.0070.00614.46
5.6.40.0090.00314.39
5.6.30.0110.00414.29
5.6.20.0110.00614.36
5.6.10.0060.00614.22
5.6.00.0060.00914.15
5.5.380.0080.00410.80
5.5.370.0130.00511.25
5.5.360.0060.01211.32
5.5.350.0130.04515.88
5.5.340.0120.04114.61
5.5.330.0100.04415.69
5.5.320.0220.03715.59
5.5.310.0160.03815.82
5.5.300.0170.03614.71
5.5.290.0110.04114.62
5.5.280.0070.04715.77
5.5.270.0100.02015.98
5.5.260.0090.03415.90
5.5.250.0080.04215.97
5.5.240.0050.02915.71
5.5.230.0030.00710.97
5.5.220.0040.00711.07
5.5.210.0000.00911.07
5.5.200.0000.00511.07
5.5.190.0030.00310.85
5.5.180.0060.00610.93
5.5.170.0030.00911.13
5.5.160.0000.00710.78
5.5.150.0000.00810.87
5.5.140.0050.00511.13
5.5.130.0030.00910.89
5.5.120.0040.00410.62
5.5.110.0050.00511.08
5.5.100.0030.00911.11
5.5.90.0030.00811.17
5.5.80.0030.00711.21
5.5.70.0000.01211.29
5.5.60.0080.00410.91
5.5.50.0030.00711.22
5.5.40.0080.00011.26
5.5.30.0060.00011.11
5.5.20.0030.00910.81
5.5.10.0050.00510.93
5.5.00.0070.00311.03
5.4.450.0210.03815.44
5.4.440.0350.03715.27
5.4.430.0070.03215.35
5.4.420.0080.02915.15
5.4.410.0050.03215.09
5.4.400.0090.03115.04
5.4.390.0080.02914.93
5.4.380.0140.02814.80
5.4.370.0410.03114.66
5.4.360.0450.02414.82
5.4.350.0100.01712.45
5.4.340.0090.01712.39
5.4.330.0090.00310.79
5.4.320.0080.01912.49
5.4.310.0110.01912.67
5.4.300.0030.02712.59
5.4.290.0050.02612.59
5.4.280.0030.02612.35
5.4.270.0100.02012.52
5.4.260.0090.02412.46
5.4.250.0050.02712.33
5.4.240.0080.02312.47
5.4.230.0100.02212.55
5.4.220.0100.01812.34
5.4.210.0080.02312.62
5.4.200.0080.02812.32
5.4.190.0070.02412.52
5.4.180.0130.01812.49
5.4.170.0090.02012.64
5.4.160.0090.02012.38
5.4.150.0070.02312.47
5.4.140.0120.01812.29
5.4.130.0110.02012.41
5.4.120.0120.02112.44
5.4.110.0070.02312.37
5.4.100.0070.02312.37
5.4.90.0080.02012.18
5.4.80.0080.02312.38
5.4.70.0070.02212.19
5.4.60.0110.01912.39
5.4.50.0090.02312.34
5.4.40.0090.01812.12
5.4.30.0080.02112.35
5.4.20.0110.02712.23
5.4.10.0060.02512.39
5.4.00.0080.02812.05
5.3.290.0100.02312.53
5.3.280.0050.02812.27
5.3.270.0050.02812.34
5.3.260.0080.03112.52
5.3.250.0110.02212.42
5.3.240.0050.03012.26
5.3.230.0090.02412.38
5.3.220.0130.02712.21
5.3.210.0110.02312.39
5.3.200.0160.02112.50
5.3.190.0120.02412.39
5.3.180.0120.02112.58
5.3.170.0100.02512.44
5.3.160.0120.02112.48
5.3.150.0070.03012.54
5.3.140.0080.02412.26
5.3.130.0080.02312.43
5.3.120.0110.02112.39
5.3.110.0050.02212.46
5.3.100.0070.01912.07
5.3.90.0090.02112.29
5.3.80.0080.02412.16
5.3.70.0110.01712.13
5.3.60.0050.02112.19
5.3.50.0080.02311.94
5.3.40.0050.02311.97
5.3.30.0120.02012.06
5.3.20.0080.02411.93
5.3.10.0060.02311.71
5.3.00.0030.02311.82
5.2.170.0020.02310.42
5.2.160.0110.01310.46
5.2.150.0060.02110.38
5.2.140.0100.01510.46
5.2.130.0100.01210.39
5.2.120.0070.01810.42
5.2.110.0090.01910.38
5.2.100.0040.02210.44
5.2.90.0050.02010.39
5.2.80.0090.01610.43
5.2.70.0100.01810.32
5.2.60.0060.01810.32
5.2.50.0100.01810.37
5.2.40.0050.02210.27
5.2.30.0050.01810.35
5.2.20.0030.01910.27
5.2.10.0100.01310.27
5.2.00.0050.02010.21
5.1.60.0070.0149.87
5.1.50.0050.0139.86
5.1.40.0060.0159.81
5.1.30.0030.01810.07
5.1.20.0070.0129.96
5.1.10.0030.0189.81
5.1.00.0030.0189.81
5.0.50.0020.0149.14
5.0.40.0060.0109.01
5.0.30.0050.0178.88
5.0.20.0000.0158.92
5.0.10.0020.0138.98
5.0.00.0020.0208.88
4.4.90.0060.0087.76
4.4.80.0050.0087.73
4.4.70.0050.0087.76
4.4.60.0030.0107.82
4.4.50.0030.0107.75
4.4.40.0030.0157.83
4.4.30.0030.0087.73
4.4.20.0030.0107.79
4.4.10.0030.0087.81
4.4.00.0030.0177.75
4.3.110.0030.0107.75
4.3.100.0000.0127.79
4.3.90.0030.0077.73
4.3.80.0000.0187.78
4.3.70.0000.0127.69
4.3.60.0020.0127.74
4.3.50.0030.0107.68
4.3.40.0020.0157.68
4.3.30.0020.0137.08
4.3.20.0000.0147.05
4.3.10.0050.0087.06
4.3.00.0020.0158.18

preferences:
79.72 ms | 400 KiB | 5 Q