3v4l.org

run code in 300+ PHP versions simultaneously
<?php # Globale Funktion function foo( $bar ) { return true; } class Foo { static function instance() { return new Foo(); } # Statische Methode static function bar( $buz ) { return true; } # Instanz Methode function buz( $bee ) { return true; } } # Error Handler setzen um Warnungen zu verkürzen set_error_handler( "err" ); function err( $errno, $errstr ) { echo "{WARNING} "; return true; } # Funktion zum Testen der Aufrufe function test( $method ) { try { eval ( $method ); echo "$method\n"; } catch ( Throwable $e ) { $class = get_class( $e ); echo "[$class] $method\n"; } } # Tests durchführen test('foo();'); test('Foo::bar();'); test('Foo::instance()->buz();'); test('ksort();');

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.4.20.0130.00719.63
8.4.10.0130.00717.65
8.3.150.0100.01019.08
8.3.140.0060.00316.54
8.3.130.0080.00416.82
8.3.120.0130.00319.03
8.3.110.0060.00316.50
8.3.100.0100.01024.06
8.3.90.0060.00326.77
8.3.80.0110.00416.38
8.3.70.0090.00616.75
8.3.60.0120.00316.63
8.3.50.0060.00718.36
8.3.40.0070.00718.79
8.3.30.0120.00318.66
8.3.20.0070.00021.73
8.3.10.0070.00021.73
8.3.00.0040.00719.69
8.2.270.0110.00717.35
8.2.260.0070.01019.08
8.2.250.0000.00817.03
8.2.240.0130.00317.13
8.2.230.0050.00320.94
8.2.220.0050.00337.54
8.2.210.0080.00026.77
8.2.200.0040.00416.74
8.2.190.0110.00416.75
8.2.180.0120.00625.92
8.2.170.0100.00618.99
8.2.160.0070.01022.96
8.2.150.0140.00325.66
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0030.00521.01
8.2.110.0030.00620.32
8.2.100.0040.00817.78
8.2.90.0030.00619.06
8.2.80.0050.00317.97
8.2.70.0090.00017.75
8.2.60.0040.00418.04
8.2.50.0040.00418.07
8.2.40.0000.00718.22
8.2.30.0070.00018.13
8.2.20.0000.00718.01
8.2.10.0090.00017.95
8.2.00.0040.00418.16
8.1.310.0110.00416.87
8.1.300.0120.00320.16
8.1.290.0030.00730.84
8.1.280.0140.00725.92
8.1.270.0030.00623.73
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00422.72
8.1.230.0070.00419.14
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0040.00417.25
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0080.00018.83
8.1.160.0050.00218.88
8.1.150.0000.00719.00
8.1.140.0040.00417.59
8.1.130.0050.00319.09
8.1.120.0070.00017.45
8.1.110.0000.00717.36
8.1.100.0040.00417.52
8.1.90.0030.00517.46
8.1.80.0000.00817.37
8.1.70.0030.00617.47
8.1.60.0040.00417.48
8.1.50.0050.00317.52
8.1.40.0060.00317.55
8.1.30.0080.00017.66
8.1.20.0040.00417.67
8.1.10.0040.00417.48
8.1.00.0080.00017.41
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0080.00018.37
8.0.270.0030.00317.34
8.0.260.0000.00718.50
8.0.250.0030.00317.00
8.0.240.0000.00717.01
8.0.230.0050.00316.89
8.0.220.0050.00217.04
8.0.210.0000.00816.98
8.0.200.0000.00717.05
8.0.190.0000.00716.93
8.0.180.0040.00417.00
8.0.170.0000.01017.00
8.0.160.0070.00016.97
8.0.150.0040.00416.92
8.0.140.0030.00316.82
8.0.130.0000.00813.40
8.0.120.0070.00016.84
8.0.110.0020.00516.94
8.0.100.0000.00716.84
8.0.90.0000.00716.84
8.0.80.0070.00716.94
8.0.70.0030.00516.84
8.0.60.0070.00016.90
8.0.50.0040.00416.79
8.0.30.0110.00917.13
8.0.20.0130.00617.40
8.0.10.0070.00016.99
8.0.00.0100.00817.01
7.4.330.0000.00515.55
7.4.320.0000.00716.58
7.4.300.0030.00316.52
7.4.290.0080.00016.46
7.4.280.0050.00316.60
7.4.270.0020.00516.57
7.4.260.0050.00316.53
7.4.250.0030.00316.47
7.4.240.0030.00316.61
7.4.230.0040.00416.50
7.4.220.0000.00816.42
7.4.210.0110.00616.66
7.4.200.0030.00316.55
7.4.160.0110.01116.57
7.4.140.0110.00617.86
7.4.130.0120.00616.58
7.4.120.0060.01416.57
7.4.110.0130.01016.78
7.4.100.0160.00316.78
7.4.90.0170.00716.74
7.4.80.0120.01019.39
7.4.70.0160.00616.52
7.4.60.0120.00916.30
7.4.50.0060.00916.60
7.4.40.0070.01016.56
7.4.00.0070.01014.85
7.3.330.0000.00513.45
7.3.320.0060.00013.45
7.3.310.0000.00716.46
7.3.300.0030.00316.29
7.3.290.0000.00716.42
7.3.280.0090.00616.42
7.3.260.0110.00816.44
7.3.240.0070.00916.52
7.3.230.0040.01416.62
7.3.210.0030.01316.43
7.3.200.0090.00916.56
7.3.190.0090.00616.41
7.3.180.0070.01116.66
7.3.170.0060.00916.65
7.3.160.0110.00416.59
7.3.10.0060.00616.52
7.3.00.0000.01116.32
7.2.330.0130.01016.64
7.2.320.0130.00316.74
7.2.310.0130.00416.70
7.2.300.0070.01116.73
7.2.290.0040.01516.73
7.2.130.0030.00816.77
7.2.120.0080.00316.78
7.2.110.0030.01016.94
7.2.100.0070.01316.78
7.2.90.0070.00616.90
7.2.80.0070.00717.01
7.2.70.0170.00316.72
7.2.60.0060.00716.73
7.2.50.0150.00816.86
7.2.40.0650.00917.53
7.2.30.0320.01017.41
7.2.20.0520.01017.30
7.2.10.0500.00817.21
7.2.00.0350.01017.43
7.1.250.0070.00715.55
7.1.200.0050.00515.90
7.1.160.1230.01316.59
7.1.150.0640.00816.95
7.1.140.0930.01316.64
7.1.130.0800.01616.55
7.1.120.0780.01416.96
7.1.110.0850.00916.46
7.1.100.0590.01816.25
7.1.90.0920.01316.02
7.1.80.0930.00916.44
7.1.70.1170.00815.23
7.1.60.0950.01533.25
7.1.50.0860.01632.69
7.1.40.0930.01132.51
7.1.30.1260.01532.67
7.1.20.1300.01432.71
7.1.10.0760.01014.69
7.1.00.1070.01314.79

preferences:
63.94 ms | 403 KiB | 5 Q