3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function foo() { return 'A'; } } class B extends A { public static function withSelf() { return self::foo(); } public static function withParent() { return parent::foo(); } public static function withStatic() { return static::foo(); } public static function withClass() { return (parent::class)::foo(); } } echo 'Self: '.B::withSelf(), PHP_EOL, 'Parent: '.B::withParent(), PHP_EOL, 'Static: '.B::withStatic(), PHP_EOL, 'Class: '.B::withClass();

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.0160.00018.04
8.3.50.0120.00916.30
8.3.40.0120.00618.66
8.3.30.0150.00318.39
8.3.20.0000.00720.33
8.3.10.0030.00623.65
8.3.00.0040.00423.51
8.2.180.0070.00718.04
8.2.170.0110.00722.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00319.64
8.2.120.0050.00226.35
8.2.110.0060.00322.03
8.2.100.0080.00417.91
8.2.90.0030.00519.05
8.2.80.0080.00017.97
8.2.70.0000.00817.48
8.2.60.0040.00417.91
8.2.50.0040.00418.07
8.2.40.0030.00720.61
8.2.30.0000.00719.43
8.2.20.0000.00717.55
8.2.10.0040.00417.98
8.2.00.0060.00317.87
8.1.280.0100.00725.92
8.1.270.0000.00820.24
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0120.00020.68
8.1.230.0120.00019.08
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0040.00417.22
8.1.180.0060.00318.10
8.1.170.0040.00418.59
8.1.160.0000.00720.64
8.1.150.0030.00318.69
8.1.140.0060.00319.37
8.1.130.0040.00417.65
8.1.120.0030.00317.34
8.1.110.0000.00717.37
8.1.100.0000.00717.26
8.1.90.0000.00717.28
8.1.80.0040.00417.19
8.1.70.0000.00717.40
8.1.60.0040.00417.57
8.1.50.0000.00717.35
8.1.40.0040.00417.36
8.1.30.0040.00417.50
8.1.20.0050.00317.54
8.1.10.0000.00717.50
8.1.00.0000.00817.45
8.0.300.0000.00718.77
8.0.290.0000.00816.63
8.0.280.0070.00018.45
8.0.270.0030.00317.24
8.0.260.0030.00317.31
8.0.250.0000.00616.92
8.0.240.0070.00016.82
8.0.230.0000.00716.98
8.0.220.0040.00416.76
8.0.210.0070.00016.78
8.0.200.0030.00616.95
8.0.190.0040.00416.87
8.0.180.0000.00716.83
8.0.170.0040.00416.80
8.0.160.0000.00716.97
8.0.150.0040.00416.85
8.0.140.0070.00016.72
8.0.130.0030.00313.36
8.0.120.0040.00416.90
8.0.110.0080.00016.71
8.0.100.0040.00416.78
8.0.90.0000.00716.64
8.0.80.0080.00516.76
8.0.70.0040.00416.71
8.0.60.0050.00216.72
8.0.50.0070.00016.76
8.0.30.0080.01016.85
8.0.20.0070.01217.40
8.0.10.0000.00816.93
8.0.00.0100.00916.90
7.4.330.0050.00016.72
7.4.320.0060.00016.46
7.4.300.0030.00716.62
7.4.290.0000.00716.43
7.4.280.0080.00016.59
7.4.270.0000.00716.61
7.4.260.0070.00416.48
7.4.250.0050.00316.42
7.4.240.0040.00316.52
7.4.230.0030.00316.70
7.4.220.0080.00816.49
7.4.210.0030.01416.56
7.4.200.0000.00716.34
7.4.160.0100.01316.25
7.4.150.0130.00717.40
7.4.140.0130.01117.86
7.4.130.0130.00916.44
7.4.120.0100.00716.37
7.4.110.0110.00616.52
7.4.100.0120.00616.45
7.4.90.0100.00716.60
7.4.80.0070.01019.39
7.4.70.0140.00416.36
7.4.60.0060.01016.60
7.4.50.0030.01016.38
7.4.40.0060.01016.41
7.4.30.0110.00716.44
7.4.00.0060.01014.82
7.3.330.0000.00513.13
7.3.320.0050.00013.23
7.3.310.0000.00716.25
7.3.300.0070.00016.16
7.3.290.0050.00216.25
7.3.280.0070.01216.26
7.3.270.0070.01017.40
7.3.260.0140.00316.30
7.3.250.0120.00716.39
7.3.240.0100.00816.51
7.3.230.0090.00916.39
7.3.210.0070.01016.41
7.3.200.0130.00916.40
7.3.190.0120.00616.35
7.3.180.0030.01416.14
7.3.170.0150.00316.34
7.3.160.0110.00516.23
7.3.120.0000.01514.45
7.3.110.0030.01314.79
7.3.100.0060.00614.95
7.3.90.0030.00714.66
7.3.80.0030.00614.94
7.3.70.0060.01014.82
7.3.60.0040.00714.58
7.3.50.0040.00814.48
7.3.40.0040.01114.75
7.3.30.0080.00814.89
7.3.20.0030.00716.68
7.3.10.0090.00316.63
7.3.00.0090.00816.43
7.2.330.0110.00716.38
7.2.320.0040.01216.62
7.2.310.0100.00716.62
7.2.300.0030.01316.67
7.2.290.0100.00716.63
7.2.240.0080.00815.07
7.2.230.0000.00914.91
7.2.220.0000.01315.11
7.2.210.0130.00315.20
7.2.200.0080.00415.16
7.2.190.0130.00314.90
7.2.180.0040.01114.70
7.2.170.0130.00015.12
7.2.160.0030.01314.96
7.2.150.0060.01116.64
7.2.140.0060.01016.89
7.2.130.0060.00916.81
7.2.120.0030.01016.76
7.2.110.0050.00716.77
7.2.100.0090.00516.88
7.2.90.0070.00816.61
7.2.80.0100.00416.76
7.2.70.0050.00916.77
7.2.60.0050.00916.74
7.2.50.0040.01016.64
7.2.40.0090.00716.70
7.2.30.0050.00916.79
7.2.20.0060.00816.86
7.2.10.0020.01216.82
7.2.00.0100.00517.73
7.1.330.0040.00815.68
7.1.320.0030.01215.69
7.1.310.0030.01415.72
7.1.300.0060.00615.41
7.1.290.0050.00515.52
7.1.280.0030.00615.69
7.1.270.0070.00715.73
7.1.260.0060.00915.64
7.1.250.0040.00915.24
7.1.240.0000.00915.52
7.1.230.0030.00615.30
7.1.220.0000.00915.25
7.1.210.0000.01215.10
7.1.200.0040.00715.71
7.1.190.0070.00715.27
7.1.180.0060.01015.36
7.1.170.0100.00615.57
7.1.160.0070.00715.34
7.1.150.0070.00715.41
7.1.140.0060.00315.65
7.1.130.0000.01415.11
7.1.120.0080.00315.48
7.1.110.0030.00615.16
7.1.100.0030.00816.96
7.1.90.0070.00715.50
7.1.80.0090.00315.29
7.1.70.0020.00816.36
7.1.60.0110.00617.20
7.1.50.0050.00715.94
7.1.40.0060.00615.73
7.1.30.0030.01015.23
7.1.20.0060.00615.13
7.1.10.0030.01015.50
7.1.00.0060.03818.87
7.0.330.0050.00814.87
7.0.320.0060.00615.23
7.0.310.0050.00315.32
7.0.300.0070.00715.28
7.0.290.0030.00615.09
7.0.280.0080.00814.98
7.0.270.0110.00414.79
7.0.260.0000.01114.83
7.0.250.0090.00315.04
7.0.240.0040.00415.01
7.0.230.0030.01014.86
7.0.220.0030.01015.45
7.0.210.0040.00715.18
7.0.200.0020.00816.01
7.0.190.0030.00615.24
7.0.180.0060.00915.11
7.0.170.0100.00015.18
7.0.160.0050.00515.08
7.0.150.0040.00415.31
7.0.140.0030.01015.04
7.0.130.0030.00915.11
7.0.120.0030.01014.91
7.0.110.0030.00814.84
7.0.100.0060.00615.21
7.0.90.0070.00715.27
7.0.80.0060.00315.25
7.0.70.0040.00815.05
7.0.60.0130.04317.40
7.0.50.0020.04416.59
7.0.40.0070.02516.61
7.0.30.0240.03816.57
7.0.20.0120.02816.76
7.0.10.0050.03816.64
7.0.00.0100.02716.70
5.6.380.0030.01314.22
5.6.370.0000.00913.93
5.6.360.0040.01114.28
5.6.350.0060.01014.17
5.6.340.0090.00613.95
5.6.330.0060.00914.16
5.6.320.0120.00313.85
5.6.310.0000.01114.26
5.6.300.0100.00714.13
5.6.290.0070.00414.26
5.6.280.0030.02217.41
5.6.270.0040.00414.04
5.6.260.0000.00714.23
5.6.250.0060.00613.87
5.6.240.0070.00014.16
5.6.230.0090.00314.11
5.6.220.0080.00014.10
5.6.210.0130.03517.34
5.6.200.0100.04216.22
5.6.190.0030.04317.23
5.6.180.0230.02817.38
5.6.170.0100.02517.22
5.6.160.0070.04717.21
5.6.150.0100.04716.21
5.6.140.0060.02116.21
5.6.130.0020.04916.00
5.6.120.0070.04117.53
5.6.110.0070.04417.42
5.6.100.0100.03517.33
5.6.90.0100.04017.37
5.6.80.0090.04017.17
5.6.70.0030.01013.98
5.6.60.0030.00713.92
5.6.50.0060.00614.16
5.6.40.0040.00713.73
5.6.30.0040.00813.65
5.6.20.0080.00613.82
5.6.10.0050.00513.64
5.6.00.0100.00314.03
5.5.380.0030.00610.48
5.5.370.0070.00310.78
5.5.360.0030.00310.48
5.5.350.0040.03715.45
5.5.340.0070.03114.41
5.5.330.0050.04215.61
5.5.320.0120.02315.67
5.5.310.0120.03315.69
5.5.300.0030.02814.23
5.5.290.0080.02414.32
5.5.280.0070.02715.85
5.5.270.0100.04015.66
5.5.260.0030.04715.58
5.5.250.0030.04515.49
5.5.240.0150.03015.50
5.5.230.0030.00810.54
5.5.220.0030.00910.48
5.5.210.0030.00710.59
5.5.200.0000.01110.93
5.5.190.0080.00410.59
5.5.180.0070.00310.70
5.5.170.0000.01210.72
5.5.160.0060.00610.82
5.5.150.0030.00311.09
5.5.140.0000.00910.67
5.5.130.0030.00610.82
5.5.120.0060.00310.54
5.5.110.0030.01010.86
5.5.100.0060.00610.77
5.5.90.0030.00310.58
5.5.80.0030.00910.92
5.5.70.0030.00810.89
5.5.60.0040.00410.93
5.5.50.0000.01210.92
5.5.40.0040.00710.53
5.5.30.0000.00810.61
5.5.20.0030.00910.98
5.5.10.0030.00610.90
5.5.00.0000.00810.82

preferences:
53.52 ms | 400 KiB | 5 Q