3v4l.org

run code in 300+ PHP versions simultaneously
<?php function s1(int $val) { return (string)$val; } function s2(int $val) { return strval($val); }

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.130.0080.00018.39
8.3.120.0100.00517.57
8.3.110.0210.00518.59
8.3.100.0220.01016.54
8.3.90.0220.00324.12
8.3.80.0080.00816.58
8.3.70.0190.00716.49
8.3.60.0150.00817.24
8.3.50.0150.00316.61
8.3.40.0210.00517.95
8.3.30.0170.00717.94
8.3.20.0100.00420.73
8.3.10.0130.00720.81
8.3.00.0110.00718.48
8.2.250.0040.00418.98
8.2.240.0100.00917.62
8.2.230.0090.00619.50
8.2.220.0160.00320.12
8.2.210.0040.00921.47
8.2.200.0060.00916.27
8.2.190.0190.00416.46
8.2.180.0120.00725.40
8.2.170.0160.00520.21
8.2.160.0150.00220.27
8.2.150.0170.00521.50
8.2.140.0120.00320.99
8.2.130.0120.00821.63
8.2.120.0130.00618.91
8.2.110.0180.00419.21
8.2.100.0170.00617.58
8.2.90.0170.00717.79
8.2.80.0170.00517.47
8.2.70.0100.00461.59
8.2.60.0160.00738.17
8.2.50.0150.00433.06
8.2.40.0110.00833.58
8.2.30.0100.00625.09
8.2.20.0110.00630.18
8.2.10.0130.00730.48
8.2.00.0080.00734.63
8.1.300.0200.00516.68
8.1.290.0120.01223.36
8.1.280.0190.00920.78
8.1.270.0160.00819.64
8.1.260.0170.00521.71
8.1.250.0200.00522.59
8.1.240.0150.00917.98
8.1.230.0160.00818.86
8.1.220.0140.00717.47
8.1.210.0130.00917.95
8.1.200.0150.00437.92
8.1.190.0160.00537.75
8.1.180.0170.00738.12
8.1.170.0140.00533.34
8.1.160.0140.00630.31
8.1.150.0130.00630.34
8.1.140.0120.00430.32
8.1.130.0160.00330.61
8.1.120.0160.00330.07
8.1.110.0080.00623.64
8.1.100.0080.00521.82
8.1.90.0130.00524.34
8.1.80.0110.00522.60
8.1.70.0120.00523.69
8.1.60.0140.00522.70
8.1.50.0130.00523.69
8.1.40.0120.00522.23
8.1.30.0150.00423.24
8.1.20.0120.00723.20
8.1.10.0140.00523.11
8.1.00.0130.00623.12
8.0.300.0170.00519.17
8.0.290.0140.00637.45
8.0.280.0140.00629.99
8.0.270.0140.00629.87
8.0.260.0100.00830.01
8.0.250.0140.00329.78
8.0.240.0110.00627.48
8.0.230.0120.00424.83
8.0.220.0110.00623.88
8.0.210.0110.00423.16
8.0.200.0090.00423.25
8.0.190.0100.00623.23
8.0.180.0110.00423.19
8.0.170.0100.00622.58
8.0.160.0090.00622.60
8.0.150.0120.00322.57
8.0.140.0110.00522.58
8.0.130.0140.00322.20
8.0.120.0120.00522.59
8.0.110.0120.00522.60
8.0.100.0110.00522.53
8.0.90.0130.00422.58
8.0.80.0100.00721.00
8.0.70.0140.00522.55
8.0.60.0120.00622.53
8.0.50.0110.00622.58
8.0.30.0130.00621.33
8.0.20.0130.00621.35
8.0.10.0130.00621.39
8.0.00.0100.00621.44
7.4.330.0130.00328.98
7.4.320.0120.00527.33
7.4.300.0090.00421.06
7.4.290.0140.00322.91
7.4.280.0090.00822.31
7.4.270.0120.00522.32
7.4.260.0090.00622.01
7.4.250.0130.00422.29
7.4.240.0100.00622.34
7.4.230.0110.00522.34
7.4.220.0090.00621.77
7.4.210.0120.00422.31
7.4.200.0090.00922.32
7.4.190.0110.00622.38
7.4.180.0130.00522.38
7.4.160.0150.00421.04
7.4.150.0120.00521.02
7.4.140.0120.00420.95
7.4.130.0130.00420.89
7.4.120.0110.00620.90
7.4.110.0120.00520.87
7.4.100.0110.00620.41
7.4.90.0100.00620.90
7.4.80.0110.00720.93
7.4.70.0110.00620.90
7.4.60.0120.00520.91
7.4.50.0110.00620.84
7.4.40.0100.00620.82
7.4.30.0110.00520.92
7.4.20.0120.00420.92
7.4.10.0100.00620.90
7.4.00.0110.00520.59
7.3.330.0090.00420.55
7.3.320.0120.00421.83
7.3.310.0110.00622.12
7.3.300.0120.00522.08
7.3.290.0130.00522.11
7.3.280.0120.00620.82
7.3.270.0120.00520.84
7.3.260.0110.00720.83
7.3.250.0120.00620.81
7.3.240.0120.00520.84
7.3.230.0130.00520.85
7.3.220.0130.00620.75
7.3.210.0110.00820.76
7.3.200.0110.00620.77
7.3.190.0120.00620.77
7.3.180.0130.00720.32
7.3.170.0130.00520.80
7.3.160.0110.00720.78
7.3.150.0130.00520.78
7.3.140.0120.00720.75
7.3.130.0130.00520.76
7.3.120.0110.00520.78
7.3.110.0110.00620.71
7.3.100.0130.00620.70
7.3.90.0120.00620.96
7.3.80.0140.00620.78
7.3.70.0130.00720.89
7.3.60.0140.00520.95
7.3.50.0130.00620.92
7.3.40.0120.00620.91
7.3.30.0120.00620.92
7.3.20.0160.00521.70
7.3.10.0170.00721.65
7.3.00.0130.00721.67

preferences:
53.9 ms | 403 KiB | 5 Q