3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* final */class Animal { public static $version = 'ANI01'; public function move(int $steps): void { echo "$steps déplacements"; } public static function version(): string { // return static::$version; return self::$version; } } class Cat extends Animal { public static $version = 'CAT07'; public function move(int $steps): void { // parent::move($steps); echo "$steps pas"; } } $animal = new Animal(); $cat = new Cat(); $cat->move(2); echo PHP_EOL; echo Cat::version().PHP_EOL; var_dump($cat instanceof Animal); var_dump(Cat::class);

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.0150.00318.31
8.3.50.0140.00016.20
8.3.40.0060.00918.57
8.3.30.0070.00718.61
8.3.20.0050.00320.26
8.3.10.0000.00823.51
8.3.00.0090.00920.55
8.2.180.0070.01118.16
8.2.170.0070.00722.96
8.2.160.0100.00721.96
8.2.150.0080.00024.18
8.2.140.0050.00322.25
8.2.130.0050.00322.11
8.1.280.0040.01125.92
8.1.270.0030.00524.01
8.1.260.0100.00723.89
7.4.10.0230.00616.38
7.4.00.0080.01115.71
7.3.130.0080.01616.35
7.3.120.0070.01416.36
7.3.110.0190.00316.45
7.3.100.0110.01816.52
7.3.90.0170.00516.25
7.3.80.0170.00716.19
7.3.70.0100.01216.51
7.3.60.0090.01016.30
7.3.50.0120.00916.36
7.3.40.0100.01516.27
7.3.30.0200.00416.16
7.3.20.0170.00618.05
7.3.10.0130.01618.28
7.3.00.0240.00018.25
7.2.260.0180.00716.33
7.2.250.0160.00916.65
7.2.240.0150.00916.79
7.2.230.0160.00816.39
7.2.220.0080.01216.71
7.2.210.0160.00516.48
7.2.200.0080.02016.43
7.2.190.0080.01316.43
7.2.180.0130.00916.69
7.2.170.0160.00716.39
7.2.160.0170.00716.52
7.2.150.0110.01418.41
7.2.140.0120.01218.28
7.2.130.0210.00318.50
7.2.120.0140.01418.45
7.2.110.0170.01418.38
7.2.100.0090.01718.30
7.2.90.0120.01218.37
7.2.80.0170.01018.42
7.2.70.0210.00618.41
7.2.60.0120.00917.56
7.2.50.0120.02018.34
7.2.40.0120.01618.35
7.2.30.0100.01518.30
7.2.20.0150.01218.25
7.2.10.0120.01318.29
7.2.00.0060.01018.76
7.1.330.0150.00717.21
7.1.320.0130.01017.19
7.1.310.0140.01117.36
7.1.300.0190.01017.25
7.1.290.0510.00815.71
7.1.280.1500.00717.18
7.1.270.0160.00817.25
7.1.260.0120.00817.41
7.1.250.0140.01417.35
7.1.240.0180.00917.14
7.1.230.0210.00617.20
7.1.220.0140.01117.43
7.1.210.0130.00817.33
7.1.200.0110.00716.55
7.1.190.0140.01317.30
7.1.180.0140.01217.45
7.1.170.0140.01017.15
7.1.160.0040.02117.45
7.1.150.0080.00813.13
7.1.140.0140.00313.13
7.1.130.0170.00717.34
7.1.120.0170.00617.23
7.1.110.0180.00217.40
7.1.100.0100.01017.86
7.1.90.0060.01917.42
7.1.80.0060.01717.38
7.1.70.0100.00617.29
7.1.60.0220.01225.38
7.1.50.0310.01025.16
7.1.40.0280.01424.85
7.1.30.0290.00824.97
7.1.20.0190.01225.13
7.1.10.0720.00716.05
7.1.00.0180.00816.01
7.0.330.0080.01616.85
7.0.320.0110.00916.99
7.0.310.0130.00817.06
7.0.300.0190.00316.77
7.0.290.0140.01417.00
7.0.280.0150.00817.06
7.0.270.0120.00916.94
7.0.260.0180.00916.85
7.0.250.0110.00916.79
7.0.240.0140.00917.09
7.0.230.0110.01116.85
7.0.220.0160.00717.00
7.0.210.0100.01717.01
7.0.200.0170.01115.99
7.0.190.0190.00815.96
7.0.180.0210.00315.64
7.0.170.0090.01615.48
7.0.160.0150.01115.62
7.0.150.0150.00813.73
7.0.140.0120.01215.71
7.0.130.0190.00915.76
7.0.120.0430.00815.74
7.0.110.0210.00815.80
7.0.100.0330.00515.72
7.0.90.0180.00815.65
7.0.80.0180.01215.68
7.0.70.0130.01415.64
7.0.60.0170.01115.75
7.0.50.0180.00815.73
7.0.40.0200.00714.71
7.0.30.0240.00714.72
7.0.20.0160.00614.77
7.0.10.0170.01014.83
7.0.00.0200.00514.74
5.6.400.0140.00815.93
5.6.390.0230.00415.68
5.6.380.0140.01115.70
5.6.370.0150.00915.88
5.6.360.0160.00615.74
5.6.350.0090.01515.53
5.6.340.0130.00513.13
5.6.330.0160.00013.13
5.6.320.0150.00313.13
5.6.310.0130.01315.64
5.6.300.0200.00615.76
5.6.290.0140.01115.76
5.6.280.0120.01515.72
5.6.270.0170.00715.41
5.6.260.0090.01715.89
5.6.250.0150.01215.95
5.6.240.0140.00915.82
5.6.230.0150.01215.61
5.6.220.0250.00015.67
5.6.210.0150.00915.41
5.6.200.0150.00915.80
5.6.190.0080.01615.39
5.6.180.0100.01415.71
5.6.170.0190.00315.88
5.6.160.0110.00915.40
5.6.150.0100.01515.89
5.6.140.0170.00715.73
5.6.130.0190.00615.41
5.6.120.0100.01415.70
5.6.110.0160.00615.57
5.6.100.0120.01515.42
5.6.90.0090.01315.31
5.6.80.0150.00715.56
5.6.70.0100.01315.61
5.6.60.0120.01215.54
5.6.50.0110.01115.58
5.6.40.0220.00015.38
5.6.30.0130.00715.77
5.6.20.0130.00515.68
5.6.10.0060.00915.45
5.6.00.0150.00815.52

preferences:
47.86 ms | 401 KiB | 5 Q