3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Printable { public function __toString(); } class MyPrintableClass implements Printable { public $myNumericProperty; public function __construct() { $this->myNumericProperty = 10; } public function __toString() { return 'My numeric property is ' . $this->myNumericProperty; } } function printSomething(string $printable) { echo $printable; } printSomething(new MyPrintableClass()); printSomething("You can't print a real sting"); printSomething(1234); printSomething(1.2); printSomething(true);

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.0000.01516.63
8.3.60.0110.00416.50
8.3.50.0070.01321.10
8.3.40.0140.00018.84
8.3.30.0090.00618.67
8.3.20.0040.00420.34
8.3.10.0000.00723.66
8.3.00.0050.00319.80
8.2.180.0100.01016.75
8.2.170.0140.00022.96
8.2.160.0070.01020.53
8.2.150.0040.00424.18
8.2.140.0040.01124.66
8.2.130.0070.00026.16
8.2.120.0090.00017.50
8.2.110.0040.00421.12
8.2.100.0070.00417.84
8.2.90.0050.00317.87
8.2.80.0000.00818.03
8.2.70.0000.00817.63
8.2.60.0070.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00419.28
8.2.30.0040.00419.96
8.2.20.0040.00417.56
8.2.10.0040.00417.94
8.2.00.0040.00418.05
8.1.280.0140.01025.92
8.1.270.0040.00420.34
8.1.260.0020.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.57
8.1.230.0000.01020.95
8.1.220.0030.00617.74
8.1.210.0050.00318.91
8.1.200.0030.00717.35
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0040.00718.51
8.1.160.0080.00022.02
8.1.150.0050.00218.77
8.1.140.0040.00417.33
8.1.130.0030.00317.74
8.1.120.0050.00317.52
8.1.110.0000.00817.37
8.1.100.0030.00617.36
8.1.90.0000.00817.39
8.1.80.0000.00717.35
8.1.70.0030.00317.52
8.1.60.0030.00617.45
8.1.50.0060.00317.50
8.1.40.0040.00417.52
8.1.30.0030.00617.71
8.1.20.0040.00417.59
8.1.10.0040.00417.58
8.1.00.0030.00517.51
8.0.300.0070.00019.88
8.0.290.0070.00016.75
8.0.280.0030.00318.45
8.0.270.0030.00317.31
8.0.260.0030.00317.16
8.0.250.0040.00417.05
8.0.240.0030.00517.03
8.0.230.0040.00416.95
8.0.220.0070.00016.97
8.0.210.0000.00716.95
8.0.200.0000.00616.96
8.0.190.0000.00717.06
8.0.180.0030.00616.88
8.0.170.0040.00417.03
8.0.160.0070.00016.88
8.0.150.0030.00516.94
8.0.140.0000.00816.88
8.0.130.0050.00013.39
8.0.120.0000.00716.85
8.0.110.0040.00416.80
8.0.100.0000.00816.91
8.0.90.0020.00516.98
8.0.80.0090.00616.93
8.0.70.0040.00417.05
8.0.60.0000.00717.00
8.0.50.0040.00416.74
8.0.30.0140.00317.11
8.0.20.0110.01117.40
8.0.10.0050.00216.92
8.0.00.0100.00816.76
7.4.330.0050.00015.08
7.4.320.0030.00316.44
7.4.300.0040.00416.44
7.4.290.0000.00816.46
7.4.280.0040.00416.55
7.4.270.0070.00016.45
7.4.260.0000.00816.54
7.4.250.0040.00416.41
7.4.240.0030.00316.53
7.4.230.0030.00316.43
7.4.220.0060.01316.57
7.4.210.0080.00616.36
7.4.200.0030.00316.43
7.4.160.0040.01216.78
7.4.150.0070.01117.40
7.4.140.0100.00917.86
7.4.130.0100.01116.49
7.4.120.0150.00616.59
7.4.110.0090.00916.46
7.4.100.0090.00916.56
7.4.90.0120.00416.52
7.4.80.0070.01019.39
7.4.70.0090.00816.49
7.4.60.0180.00316.73
7.4.50.0040.00716.65
7.4.40.0090.00716.51
7.4.30.0100.01016.54
7.4.10.0130.00315.19
7.4.00.0050.01114.84
7.3.330.0000.00713.34
7.3.320.0030.00313.18
7.3.310.0000.00716.21
7.3.300.0070.00016.32
7.3.290.0080.00916.28
7.3.280.0090.01016.30
7.3.270.0190.00017.40
7.3.260.0140.00816.57
7.3.250.0120.00816.42
7.3.240.0060.01216.36
7.3.230.0140.00416.63
7.3.210.0170.00016.24
7.3.200.0090.00916.37
7.3.190.0100.00716.56
7.3.180.0000.01616.60
7.3.170.0080.00816.37
7.3.160.0230.02916.49
7.3.130.0100.00914.86
7.3.120.0060.01214.87
7.3.110.0070.00815.12
7.3.100.0140.00314.89
7.3.90.0080.00814.66
7.3.80.0040.00814.96
7.3.70.0050.00914.83
7.3.60.0050.00814.99
7.3.50.0030.00814.94
7.3.40.0100.00514.78
7.3.30.0070.00714.65
7.3.20.0050.00616.61
7.3.10.0090.00616.61
7.3.00.0060.00816.59
7.2.330.0030.01516.66
7.2.320.0130.01016.67
7.2.310.0040.01216.55
7.2.300.0060.00916.60
7.2.290.0030.01516.57
7.2.260.0110.00614.81
7.2.250.0070.00914.99
7.2.240.0050.01115.23
7.2.230.0060.00814.93
7.2.220.0040.00915.26
7.2.210.0060.01115.11
7.2.200.0090.00514.92
7.2.190.0020.01415.09
7.2.180.0080.00314.98
7.2.170.0050.01014.93
7.2.160.0040.00814.99
7.2.150.0110.00316.67
7.2.140.0060.00616.80
7.2.130.0060.00816.74
7.2.120.0050.00916.72
7.2.110.0130.00416.85
7.2.100.0090.00816.84
7.2.90.0040.00916.92
7.2.80.0080.00616.86
7.2.70.0070.00816.91
7.2.60.0060.00716.86
7.2.50.0030.00816.85
7.2.40.0070.00516.87
7.2.30.0050.00816.85
7.2.20.0060.01116.78
7.2.10.0080.00616.88
7.2.00.0090.00517.41
7.1.330.0090.00715.90
7.1.320.0050.00915.88
7.1.310.0050.00915.89
7.1.300.0020.01015.72
7.1.290.0070.00515.85
7.1.280.0030.01015.76
7.1.270.0040.00915.75
7.1.260.0050.00915.93
7.1.250.0060.00915.81
7.1.240.0050.00715.61
7.1.230.0060.00915.77
7.1.220.0040.00715.86
7.1.210.0030.00815.93
7.1.200.0040.00815.83
7.1.190.0040.00915.84
7.1.180.0020.01015.72
7.1.170.0030.00715.77
7.1.160.0030.00815.93
7.1.150.0060.00615.77
7.1.140.0030.00915.68
7.1.130.0070.00915.74
7.1.120.0040.00915.84
7.1.110.0100.00415.80
7.1.100.0030.01016.48
7.1.90.0050.00815.79
7.1.80.0080.00315.73
7.1.70.0050.00716.31
7.1.60.0070.00917.15
7.1.50.0060.01116.20
7.1.40.0020.00915.82
7.1.30.0080.00815.78
7.1.20.0050.00715.64
7.1.10.0040.00715.75
7.1.00.0080.02717.91
7.0.330.0020.01015.28
7.0.320.0040.01115.35
7.0.310.0030.01015.33
7.0.300.0070.00515.29
7.0.290.0050.00615.53
7.0.280.0050.00815.47
7.0.270.0050.00515.16
7.0.260.0090.00515.25
7.0.250.0040.00715.49
7.0.240.0050.00915.51
7.0.230.0080.00615.25
7.0.220.0080.00615.51
7.0.210.0030.00915.47
7.0.200.0060.00715.92
7.0.190.0020.01115.54
7.0.180.0030.00915.46
7.0.170.0040.00915.44
7.0.160.0090.00715.37
7.0.150.0030.01015.40
7.0.140.0070.00515.39
7.0.130.0050.00815.43
7.0.120.0040.00615.39
7.0.110.0040.00615.39
7.0.100.0050.00615.41
7.0.90.0070.00415.46
7.0.80.0080.00415.50
7.0.70.0030.00715.26
7.0.60.0060.03116.84
7.0.50.0070.02816.37
7.0.40.0080.03215.66
7.0.30.0120.02615.67
7.0.20.0140.03115.65
7.0.10.0120.03015.71
7.0.00.0060.03615.66
5.6.400.0000.01414.08
5.6.390.0030.00714.36
5.6.380.0050.00514.57
5.6.370.0040.00714.57
5.6.360.0060.00514.41
5.6.350.0100.00414.49
5.6.340.0060.00814.12
5.6.330.0100.00314.36
5.6.320.0080.00514.09
5.6.310.0040.01014.49
5.6.300.0050.00614.32
5.6.290.0070.00814.12
5.6.280.0050.01616.63
5.6.270.0110.00314.28
5.6.260.0070.00714.21
5.6.250.0040.00814.44
5.6.240.0090.00514.31
5.6.230.0050.01014.46
5.6.220.0070.00814.39
5.6.210.0060.03116.49
5.6.200.0080.02115.61
5.6.190.0030.03616.36
5.6.180.0050.02416.31
5.6.170.0130.03116.37
5.6.160.0040.02816.37
5.6.150.0060.03115.58
5.6.140.0050.03415.48
5.6.130.0060.01915.63
5.6.120.0050.03516.56
5.6.110.0080.02916.47
5.6.100.0020.02116.46
5.6.90.0070.02216.53
5.6.80.0030.02816.32
5.6.70.0090.00414.43
5.6.60.0030.01014.37
5.6.50.0070.00814.36
5.6.40.0040.01014.31
5.6.30.0080.00614.19
5.6.20.0050.00814.14
5.6.10.0050.00914.18
5.6.00.0060.00514.05
5.5.380.0060.00512.62
5.5.370.0060.00712.72
5.5.360.0050.00812.81
5.5.350.0610.02215.22
5.5.340.0020.02014.54
5.5.330.0030.03715.19
5.5.320.0200.02715.19
5.5.310.0090.02515.27
5.5.300.0040.01814.41
5.5.290.0100.01614.43
5.5.280.0080.02115.36
5.5.270.0060.02315.34
5.5.260.0070.03215.43
5.5.250.0060.01715.21
5.5.240.0090.02915.06
5.5.230.0050.00812.63
5.5.220.0070.00512.42
5.5.210.0050.00512.74
5.5.200.0020.01112.59
5.5.190.0030.00912.67
5.5.180.0040.00812.85
5.5.170.0100.00312.69
5.5.160.0020.01012.62
5.5.150.0090.00312.68
5.5.140.0030.00812.63
5.5.130.0020.01212.73
5.5.120.0070.00312.51
5.5.110.0050.00612.63
5.5.100.0030.00612.67
5.5.90.0060.00312.53
5.5.80.0050.00612.59
5.5.70.0000.00912.36
5.5.60.0050.00712.49
5.5.50.0070.00512.62
5.5.40.0050.00812.55
5.5.30.0060.00612.72
5.5.20.0050.00612.61
5.5.10.0060.00512.48
5.5.00.0030.00812.59
5.4.450.0080.02113.66
5.4.440.0100.02113.88
5.4.430.0100.01913.79
5.4.420.0080.02213.99
5.4.410.0120.01813.81
5.4.400.0150.01413.77
5.4.390.0120.01713.82
5.4.380.0060.02313.63
5.4.370.0060.02213.67
5.4.360.0050.02613.70
5.4.350.0070.02213.61
5.4.340.0060.02113.72
5.4.330.0070.00511.12
5.4.320.0090.02213.58
5.4.310.0110.01713.74
5.4.300.0070.02213.89
5.4.290.0090.02013.79
5.4.280.0080.02313.68
5.4.270.0060.02413.70
5.4.260.0060.02213.70
5.4.250.0080.02213.88
5.4.240.0070.03413.82
5.4.230.0100.01813.70
5.4.220.0080.02013.60
5.4.210.0060.02413.64
5.4.200.0090.01913.74
5.4.190.0060.02213.60
5.4.180.0110.01713.71
5.4.170.0100.02513.63
5.4.160.0080.01913.59
5.4.150.0060.02313.66
5.4.140.0090.02012.83
5.4.130.0060.02112.94
5.4.120.0100.01912.87
5.4.110.0050.02412.68
5.4.100.0040.02312.93
5.4.90.0090.01712.72
5.4.80.0090.02012.87
5.4.70.0110.02512.76
5.4.60.0120.01612.76
5.4.50.0070.02212.73
5.4.40.0130.02012.74
5.4.30.0000.02012.77
5.4.20.0130.01812.76
5.4.10.0190.01812.79
5.4.00.0050.00511.04

preferences:
57.52 ms | 402 KiB | 5 Q