3v4l.org

run code in 300+ PHP versions simultaneously
<?php class YoProvider { protected function getYo() { return 'yo'; } } trait testTrait { function invokeProtectedMethod($object, $method) { $rm = new ReflectionMethod($object, $method); if ($rm->isProtected()) { $rm->setAccessible(TRUE); return $rm->invoke($object); } } } class testClass { use testTrait; function testYoProvider() { $yo_provider = new YoProvider(); $yo = $this->invokeProtectedMethod($yo_provider, 'getYo'); print $yo; // $this->assertEquals('yo', $yo); } } (new testClass())->testYoProvider();

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.70.0090.00616.75
8.3.60.0140.00718.56
8.3.50.0090.01116.44
8.3.40.0070.00718.67
8.3.30.0070.00718.61
8.3.20.0070.00021.90
8.3.10.0000.00721.90
8.3.00.0040.00423.66
8.2.190.0140.00716.63
8.2.180.0070.00718.16
8.2.170.0180.00422.96
8.2.160.0110.00418.86
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0050.00219.45
8.2.120.0040.00426.35
8.2.110.0060.00320.35
8.2.100.0040.00717.72
8.2.90.0030.00519.26
8.2.80.0000.00817.97
8.2.70.0090.00017.50
8.2.60.0040.00417.92
8.2.50.0030.00518.22
8.2.40.0040.00420.45
8.2.30.0040.00419.25
8.2.20.0000.00718.04
8.2.10.0040.00417.99
8.2.00.0070.00018.25
8.1.280.0040.01125.92
8.1.270.0060.00323.90
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00923.76
8.1.230.0090.00321.04
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00717.36
8.1.190.0070.00317.35
8.1.180.0070.00018.10
8.1.170.0080.00018.72
8.1.160.0030.00518.82
8.1.150.0030.00518.95
8.1.140.0000.00719.03
8.1.130.0030.00317.80
8.1.120.0030.00317.48
8.1.110.0020.00517.44
8.1.100.0000.00817.50
8.1.90.0040.00417.52
8.1.80.0070.00017.35
8.1.70.0040.00417.44
8.1.60.0030.00517.49
8.1.50.0000.00817.51
8.1.40.0030.00617.53
8.1.30.0040.00417.55
8.1.20.0050.00317.55
8.1.10.0060.00317.48
8.1.00.0000.00917.52
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0040.00418.32
8.0.270.0030.00317.20
8.0.260.0060.00017.32
8.0.250.0060.00016.99
8.0.240.0080.00016.98
8.0.230.0030.00316.85
8.0.220.0040.00416.79
8.0.210.0030.00316.91
8.0.200.0000.00616.81
8.0.190.0070.00317.02
8.0.180.0040.00416.81
8.0.170.0080.00016.93
8.0.160.0000.00816.90
8.0.150.0040.00416.89
8.0.140.0030.00316.88
8.0.130.0060.00013.36
8.0.120.0060.00316.89
8.0.110.0000.00716.83
8.0.100.0040.00416.73
8.0.90.0030.00516.86
8.0.80.0050.01016.89
8.0.70.0000.00716.88
8.0.60.0040.00416.88
8.0.50.0020.00516.94
8.0.30.0140.00317.04
8.0.20.0130.00717.40
8.0.10.0040.00417.08
8.0.00.0120.00616.90
7.4.330.0060.00016.71
7.4.320.0060.00016.37
7.4.300.0000.00816.54
7.4.290.0030.00316.55
7.4.280.0050.00316.58
7.4.270.0050.00216.62
7.4.260.0040.00716.40
7.4.250.0000.00816.57
7.4.240.0070.00016.59
7.4.230.0050.00316.63
7.4.220.0000.00816.54
7.4.210.0080.00616.60
7.4.200.0030.00316.61
7.4.160.0140.00416.55
7.4.150.0120.00517.40
7.4.140.0140.00817.86
7.4.130.0130.00416.48
7.4.120.0100.01016.52
7.4.110.0100.01316.55
7.4.100.0070.01016.52
7.4.90.0140.00316.46
7.4.80.0170.00019.39
7.4.70.0120.01216.66
7.4.60.0110.00716.51
7.4.50.0070.00516.52
7.4.40.0110.00616.48
7.4.00.0040.01115.21
7.3.330.0000.00513.21
7.3.320.0060.00013.28
7.3.310.0060.00316.28
7.3.300.0030.00316.25
7.3.290.0000.00716.20
7.3.280.0070.01016.22
7.3.270.0030.01617.40
7.3.260.0080.01016.41
7.3.250.0080.01216.35
7.3.240.0090.00816.53
7.3.230.0100.01316.43
7.3.210.0090.00916.32
7.3.200.0060.00916.31
7.3.190.0090.00616.38
7.3.180.0120.00416.21
7.3.170.0030.01316.47
7.3.160.0120.00816.28
7.2.330.0070.01116.70
7.2.320.0030.01716.70
7.2.310.0150.00316.42
7.2.300.0100.00716.59
7.2.290.0200.00316.78
7.2.60.0100.00316.63
7.2.10.0070.01019.83
7.2.00.0030.01619.89
7.1.200.0030.00915.76
7.1.120.0030.01218.31
7.1.110.0060.00917.93
7.1.100.0060.01218.08
7.1.90.0030.01217.74
7.1.80.0220.00716.22
7.1.70.0090.01217.27
7.1.60.0260.01034.98
7.1.50.0200.01034.72
7.1.40.0200.01434.20
7.1.30.0230.01634.39
7.1.20.0320.01632.82
7.1.10.0100.01016.64
7.1.00.0070.01016.64

preferences:
45.88 ms | 401 KiB | 5 Q