3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = 'ahoj'; public function fet(&$a) { } public function get() { } public function __invoke(&$a) { echo $this->a; } } $a = new A; /*$a('ahoj'); $ref = new \ReflectionMethod($a, '__invoke'); $ref->setAccessible(true); $ref->invoke($a, 'ahoj');*/ function f_a($b, &$a) { } $f = function($b, &$a) {echo 'a';}; $ref = new ReflectionFunction($f); $ref->invoke($f, 3, $a->get()); //$ar = array($a, 'fet'); //$a->fet(new DateTime);

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.0120.00618.28
8.3.50.0070.00921.21
8.3.40.0140.00718.64
8.3.30.0040.01120.23
8.3.20.0040.00420.35
8.3.10.0040.00422.14
8.3.00.0040.00422.51
8.2.180.0070.01516.63
8.2.170.0120.00322.96
8.2.160.0140.00021.91
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00920.79
8.2.110.0070.00322.04
8.2.100.0030.00917.72
8.2.90.0040.00419.08
8.2.80.0000.00819.18
8.2.70.0050.00317.48
8.2.60.0000.00918.04
8.2.50.0080.00018.07
8.2.40.0080.00020.07
8.2.30.0030.00719.37
8.2.20.0040.00417.79
8.2.10.0040.00417.77
8.2.00.0050.00317.75
8.1.280.0090.00625.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00324.02
8.1.230.0030.00719.14
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0040.00417.25
8.1.190.0000.00717.54
8.1.180.0030.00519.01
8.1.170.0000.00818.61
8.1.160.0080.00020.63
8.1.150.0080.00018.64
8.1.140.0040.00417.47
8.1.130.0070.00017.84
8.1.120.0040.00417.53
8.1.110.0030.00417.48
8.1.100.0040.00417.51
8.1.90.0080.00017.35
8.1.80.0080.00017.46
8.1.70.0000.00717.45
8.1.60.0000.00817.50
8.1.50.0040.00417.46
8.1.40.0000.00817.43
8.1.30.0080.00017.68
8.1.20.0030.00617.60
8.1.10.0040.00417.61
8.1.00.0060.00317.41
8.0.300.0000.00818.84
8.0.290.0080.00017.05
8.0.280.0030.00518.34
8.0.270.0040.00417.18
8.0.260.0030.00316.90
8.0.250.0020.00516.86
8.0.240.0060.00316.93
8.0.230.0070.00016.95
8.0.220.0030.00316.80
8.0.210.0070.00016.87
8.0.200.0000.00717.04
8.0.190.0040.00417.07
8.0.180.0000.00716.97
8.0.170.0080.00016.95
8.0.160.0030.00516.88
8.0.150.0050.00616.89
8.0.140.0000.00716.89
8.0.130.0000.00513.35
8.0.120.0030.00516.90
8.0.110.0000.00716.80
8.0.100.0030.00316.76
8.0.90.0030.00516.76
8.0.80.0060.00916.97
8.0.70.0090.00016.96
8.0.60.0000.00716.93
8.0.50.0040.00416.82
8.0.30.0050.01717.20
8.0.20.0140.00817.40
8.0.10.0000.00717.04
8.0.00.0120.01216.70
7.4.330.0020.00215.00
7.4.320.0060.00016.65
7.4.300.0030.00316.65
7.4.290.0050.00316.58
7.4.280.0030.00316.61
7.4.270.0040.00416.64
7.4.260.0000.00513.33
7.4.250.0040.00416.60
7.4.240.0010.00716.53
7.4.230.0030.00316.41
7.4.220.0090.00916.55
7.4.210.0100.00716.59
7.4.200.0040.00416.47
7.4.190.0030.00316.42
7.4.160.0110.00816.77
7.4.150.0060.01417.40
7.4.140.0120.00817.86
7.4.130.0050.01616.59
7.4.120.0070.01016.59
7.4.110.0100.00716.50
7.4.100.0140.00316.49
7.4.90.0100.00916.53
7.4.80.0100.01019.39
7.4.70.0080.01116.64
7.4.60.0100.01316.51
7.4.50.0040.00416.47
7.4.40.0070.01022.77
7.4.30.0160.00816.33
7.4.10.0100.00714.94
7.4.00.0050.01014.66
7.3.330.0000.00513.20
7.3.320.0000.00713.33
7.3.310.0060.00316.41
7.3.300.0000.00716.38
7.3.290.0030.01116.38
7.3.280.0060.00916.38
7.3.270.0080.01117.40
7.3.260.0040.01316.49
7.3.250.0110.00616.48
7.3.240.0130.00716.35
7.3.230.0030.01416.39
7.3.210.0070.01016.25
7.3.200.0070.01019.39
7.3.190.0140.00716.59
7.3.180.0120.00316.61
7.3.170.0060.00916.50
7.3.160.0060.01516.47
7.3.130.0060.00914.53
7.3.120.0070.00914.60
7.3.110.0040.01414.68
7.3.100.0060.00915.07
7.3.90.0000.01614.82
7.3.80.0070.00714.96
7.3.70.0100.00714.64
7.3.60.0130.00014.81
7.3.50.0000.01314.67
7.3.40.0070.00414.71
7.3.30.0090.00614.75
7.3.20.0060.00916.61
7.3.10.0080.00316.62
7.3.00.0060.00716.38
7.2.330.0080.01216.56
7.2.320.0190.00416.83
7.2.310.0130.00416.60
7.2.300.0120.00916.58
7.2.290.0080.00816.79
7.2.260.0100.00714.92
7.2.250.0080.01115.22
7.2.240.0000.01414.91
7.2.230.0100.00314.98
7.2.220.0070.00715.32
7.2.210.0090.00615.17
7.2.200.0000.01415.25
7.2.190.0030.01315.23
7.2.180.0060.01015.07
7.2.170.0070.00715.12
7.2.160.0060.00914.94
7.2.150.0060.00917.09
7.2.140.0080.01116.77
7.2.130.0000.01316.93
7.2.120.0050.00916.70
7.2.110.0060.00716.85
7.2.100.0100.00216.90
7.2.90.0050.00717.07
7.2.80.0050.00916.79
7.2.70.0070.00916.78
7.2.60.0070.00617.01
7.2.50.0070.00616.73
7.2.40.0050.00916.92
7.2.30.0090.00416.90
7.2.20.0070.00816.82
7.2.10.0060.00916.84
7.2.00.0060.00717.71
7.1.330.0150.00015.65
7.1.320.0000.01515.86
7.1.310.0100.00315.91
7.1.300.0060.00615.65
7.1.290.0060.00915.45
7.1.280.0060.00615.50
7.1.270.0040.00815.75
7.1.260.0040.01415.47
7.1.250.0060.00615.75
7.1.240.0040.00915.63
7.1.230.0030.01015.54
7.1.220.0020.01015.47
7.1.210.0020.00915.45
7.1.200.0070.00715.77
7.1.190.0080.00115.72
7.1.180.0090.00715.70
7.1.170.0050.00715.59
7.1.160.0060.00515.62
7.1.150.0030.00915.57
7.1.140.0070.00815.82
7.1.130.0060.00715.79
7.1.120.0070.00715.85
7.1.110.0020.01115.84
7.1.100.0040.00916.64
7.1.90.0030.00915.91
7.1.80.0060.00515.64
7.1.70.0030.00916.09
7.1.60.0130.00416.98
7.1.50.0040.01215.95
7.1.40.0050.00715.77
7.1.30.0090.00315.76
7.1.20.0020.01115.77
7.1.10.0080.00915.77
7.1.00.0050.01917.97
7.0.330.0060.00815.32
7.0.320.0050.00915.32
7.0.310.0050.00515.24
7.0.300.0050.00615.49
7.0.290.0070.00515.44
7.0.280.0030.01015.28
7.0.270.0050.00715.44
7.0.260.0100.00315.24
7.0.250.0050.00615.30
7.0.240.0060.00815.39
7.0.230.0050.00515.40
7.0.220.0050.00815.37
7.0.210.0110.00315.52
7.0.200.0020.01015.76
7.0.190.0080.00315.48
7.0.180.0030.00815.37
7.0.170.0040.00915.21
7.0.160.0070.00715.41
7.0.150.0050.00615.22
7.0.140.0080.02817.72
7.0.130.0080.00415.29
7.0.120.0090.00715.40
7.0.110.0090.02116.90
7.0.100.0110.02616.91
7.0.90.0070.02616.91
7.0.80.0060.03116.94
7.0.70.0030.03416.91
7.0.60.0060.02016.80
7.0.50.0040.01917.03
7.0.40.0050.02815.45
7.0.30.0070.03315.51
7.0.20.0060.01715.53
7.0.10.0010.02615.42
7.0.00.0010.03415.57
5.6.400.0040.00814.62
5.6.390.0100.00314.64
5.6.380.0090.00514.46
5.6.370.0090.00614.24
5.6.360.0030.00914.48
5.6.350.0020.00814.17
5.6.340.0090.00714.50
5.6.330.0070.00814.47
5.6.320.0030.00914.30
5.6.310.0040.01314.24
5.6.300.0070.01014.36
5.6.290.0070.00414.44
5.6.280.0030.03116.62
5.6.270.0120.00114.30
5.6.260.0100.02016.41
5.6.250.0100.01516.40
5.6.240.0030.02116.28
5.6.230.0040.02916.42
5.6.220.0100.02316.60
5.6.210.0100.01916.50
5.6.200.0040.02116.46
5.6.190.0060.01816.49
5.6.180.0080.01916.38
5.6.170.0040.03016.44
5.6.160.0090.01616.48
5.6.150.0090.01516.32
5.6.140.0060.02316.50
5.6.130.0050.02216.59
5.6.120.0050.02216.45
5.6.110.0110.01416.43
5.6.100.0050.02116.48
5.6.90.0060.03016.51
5.6.80.0050.02416.14
5.6.70.0030.02316.11
5.6.60.0030.02716.11
5.6.50.0020.02416.21
5.6.40.0020.03016.10
5.6.30.0020.02916.19
5.6.20.0060.03216.10
5.6.10.0060.02416.11
5.6.00.0080.02516.14
5.5.380.0020.02214.35
5.5.370.0060.02714.38
5.5.360.0040.01814.31
5.5.350.0030.02014.29
5.5.340.0040.02714.59
5.5.330.0060.01814.34
5.5.320.0030.02114.43
5.5.310.0040.01814.58
5.5.300.0070.01614.56
5.5.290.0040.01714.42
5.5.280.0040.02114.55
5.5.270.0070.02314.44
5.5.260.0040.01914.44
5.5.250.0020.02914.46
5.5.240.0050.03014.29
5.5.230.0050.01914.23
5.5.220.0040.02314.27
5.5.210.0050.01714.20
5.5.200.0050.01714.23
5.5.190.0080.01914.29
5.5.180.0040.01914.36
5.5.170.0050.00712.52
5.5.160.0040.02714.23
5.5.150.0060.03014.16
5.5.140.0040.02614.24
5.5.130.0060.03014.34
5.5.120.0040.02514.10
5.5.110.0080.02914.31
5.5.100.0030.02214.21
5.5.90.0050.02014.22
5.5.80.0050.01614.05
5.5.70.0030.02014.18
5.5.60.0040.01614.11
5.5.50.0060.01914.27
5.5.40.0030.02914.10
5.5.30.0030.02014.19
5.5.20.0060.01714.24
5.5.10.0060.01714.10
5.5.00.0060.02214.34
5.4.450.0060.02313.96
5.4.440.0100.01714.02
5.4.430.0040.03013.98
5.4.420.0030.02614.06
5.4.410.0030.02413.90
5.4.400.0090.01713.87
5.4.390.0040.01613.87
5.4.380.0030.01813.87
5.4.370.0020.01813.95
5.4.360.0050.02413.79
5.4.350.0060.02613.87
5.4.340.0020.01913.81
5.4.330.0020.01111.19
5.4.320.0050.01613.79
5.4.310.0030.02113.89
5.4.300.0030.02813.79
5.4.290.0040.02113.86
5.4.280.0030.01913.80
5.4.270.0030.01813.90
5.4.260.0020.02713.90
5.4.250.0090.02213.84
5.4.240.0100.01213.79
5.4.230.0050.02413.93
5.4.220.0020.02113.80
5.4.210.0040.02713.82
5.4.200.0040.02013.79
5.4.190.0070.01713.80
5.4.180.0010.02313.89
5.4.170.0060.01613.91
5.4.160.0040.02813.94
5.4.150.0030.01713.79
5.4.140.0070.02312.94
5.4.130.0040.02613.00
5.4.120.0020.02912.97
5.4.110.0050.02512.95
5.4.100.0040.02813.06
5.4.90.0060.02512.94
5.4.80.0030.02612.99
5.4.70.0060.02113.02
5.4.60.0070.02113.02
5.4.50.0030.02912.99
5.4.40.0060.01712.98
5.4.30.0050.02213.01
5.4.20.0060.01513.06
5.4.10.0020.01812.97
5.4.00.0010.02312.81
5.3.290.0030.02812.36
5.3.280.0060.01712.37
5.3.270.0040.02412.33
5.3.260.0040.02512.33
5.3.250.0030.01812.38
5.3.240.0040.01912.38
5.3.230.0020.02712.35
5.3.220.0040.03312.32
5.3.210.0070.02712.36
5.3.200.0060.01912.32
5.3.190.0040.02912.31
5.3.180.0030.03012.32
5.3.170.0060.02012.32
5.3.160.0090.02312.36
5.3.150.0030.01812.31
5.3.140.0080.02012.26
5.3.130.0040.01812.34
5.3.120.0030.01912.31
5.3.110.0030.01512.36
5.3.100.0060.02412.17
5.3.90.0060.02012.16
5.3.80.0060.01512.13
5.3.70.0030.01812.12
5.3.60.0070.01712.11
5.3.50.0060.02512.12
5.3.40.0030.01712.14
5.3.30.0050.01712.10
5.3.20.0060.01412.05
5.3.10.0030.01712.04
5.3.00.0030.01511.99
5.2.170.0050.01711.54
5.2.160.0080.01211.54
5.2.150.0050.01311.54
5.2.140.0050.01911.54
5.2.130.0010.02111.54
5.2.120.0030.01511.54
5.2.110.0040.01711.54
5.2.100.0030.01811.54
5.2.90.0050.02011.54
5.2.80.0040.03111.54
5.2.70.0060.01811.54
5.2.60.0020.02511.54
5.2.50.0030.01611.54
5.2.40.0040.01511.54
5.2.30.0030.01611.54
5.2.20.0030.02811.54
5.2.10.0050.02211.54
5.2.00.0030.02611.54
5.1.60.0050.01511.54
5.1.50.0030.01811.54
5.1.40.0070.01411.54
5.1.30.0020.02811.54
5.1.20.0020.03111.54
5.1.10.0020.03011.54
5.1.00.0090.02211.54
5.0.50.0030.01211.54
5.0.40.0050.00811.54
5.0.30.0020.02011.54
5.0.20.0030.01311.54
5.0.10.0020.01411.54
5.0.00.0000.02211.54
4.4.90.0030.00811.54
4.4.80.0020.01011.54
4.4.70.0000.01511.54
4.4.60.0030.00811.54
4.4.50.0030.01011.54
4.4.40.0030.02011.54
4.4.30.0030.01511.54
4.4.20.0040.01711.54
4.4.10.0070.00511.54
4.4.00.0020.01811.54
4.3.110.0010.01111.54
4.3.100.0020.00811.54
4.3.90.0000.01111.54
4.3.80.0010.01611.54
4.3.70.0060.00711.54
4.3.60.0000.01611.54
4.3.50.0020.01011.54
4.3.40.0000.01411.54
4.3.30.0030.00711.54
4.3.20.0000.01011.54
4.3.10.0000.01911.54
4.3.00.0000.01311.54

preferences:
43.36 ms | 401 KiB | 5 Q