3v4l.org

run code in 300+ PHP versions simultaneously
<?php function validatePrintf($format, $arguments) { if (preg_match_all("~%(?:(\d+)[$])?[-+]?(?:[ 0]|['].)?(?:[-]?\d+)?(?:[.]\d+)?[%bcdeEufFgGosxX]~", $format, $expected) > 0) { return $expected; return (count((array) $arguments) >= intval(max($expected[1]))); } return false; } var_dump(validatePrintf('The %2$s contains %1$d monkeys', array(5, 'tree')));

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.40.0070.01418.79
8.3.30.0150.00618.85
8.3.20.0050.00318.86
8.3.10.0040.00420.70
8.3.00.0090.00019.38
8.2.170.0140.00722.96
8.2.160.0070.00722.25
8.2.150.0040.00424.18
8.2.140.0120.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.64
8.2.110.0060.00319.27
8.2.100.0000.01217.85
8.2.90.0060.00317.88
8.2.80.0080.00317.97
8.2.70.0000.00917.80
8.2.60.0000.00818.03
8.2.50.0040.00418.10
8.2.40.0030.00522.44
8.2.30.0070.00319.23
8.2.20.0040.00417.67
8.2.10.0000.00717.87
8.2.00.0000.00717.67
8.1.270.0030.00524.66
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0030.00619.10
8.1.230.0080.00417.71
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0000.00917.35
8.1.190.0000.00917.35
8.1.180.0050.00318.10
8.1.170.0040.00418.71
8.1.160.0060.00318.80
8.1.150.0020.00518.93
8.1.140.0030.00617.58
8.1.130.0050.00317.86
8.1.120.0040.00417.51
8.1.110.0070.00017.40
8.1.100.0070.00017.46
8.1.90.0080.00017.47
8.1.80.0040.00417.51
8.1.70.0040.00417.43
8.1.60.0000.00717.76
8.1.50.0040.00417.59
8.1.40.0000.00817.67
8.1.30.0000.00717.77
8.1.20.0040.00417.67
8.1.10.0040.00417.62
8.1.00.0050.00317.54
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00418.28
8.0.270.0030.00317.05
8.0.260.0030.00516.75
8.0.250.0000.00717.02
8.0.240.0030.00616.90
8.0.230.0040.00417.00
8.0.220.0000.00717.04
8.0.210.0030.00316.85
8.0.200.0040.00417.00
8.0.190.0090.00016.95
8.0.180.0050.00316.85
8.0.170.0060.00316.90
8.0.160.0040.00416.92
8.0.150.0000.00816.85
8.0.140.0060.00316.91
8.0.130.0000.00613.36
8.0.120.0040.00417.02
8.0.110.0040.00417.06
8.0.100.0040.00417.00
8.0.90.0040.00416.80
8.0.80.0090.00617.02
8.0.70.0050.00516.82
8.0.60.0040.00416.95
8.0.50.0040.00416.90
8.0.30.0070.01217.04
8.0.20.0140.00516.99
8.0.10.0040.00417.10
8.0.00.0140.01116.97
7.4.330.0050.00013.08
7.4.320.0030.00316.77
7.4.300.0040.00416.71
7.4.290.0070.00016.84
7.4.280.0050.00316.75
7.4.270.0030.00316.73
7.4.260.0030.00313.50
7.4.250.0000.00716.81
7.4.240.0000.00816.65
7.4.230.0070.00016.63
7.4.220.0090.01216.88
7.4.210.0070.01016.80
7.4.200.0000.00716.72
7.4.190.0040.00416.82
7.4.160.0100.00616.72
7.4.150.0110.00716.50
7.4.140.0090.00816.62
7.4.130.0080.00916.72
7.4.120.0070.01016.66
7.4.110.0110.00716.84
7.4.100.0100.00716.81
7.4.90.0130.00616.70
7.4.80.0130.01016.80
7.4.70.0170.00716.83
7.4.60.0070.01016.59
7.4.50.0070.00316.71
7.4.40.0050.00516.71
7.4.30.0090.00916.71
7.4.00.0120.00315.09
7.3.330.0030.00313.27
7.3.320.0040.00313.41
7.3.310.0070.00016.24
7.3.300.0000.00716.28
7.3.290.0130.00616.38
7.3.280.0090.00716.35
7.3.270.0140.00916.54
7.3.260.0080.00916.46
7.3.250.0140.00316.68
7.3.240.0120.00616.53
7.3.230.0110.00716.37
7.3.210.0050.01216.65
7.3.200.0090.00919.39
7.3.190.0060.01616.67
7.3.180.0100.00716.46
7.3.170.0080.00816.41
7.3.160.0100.00716.50
7.3.120.0000.00915.20
7.3.00.0440.00315.03
7.2.330.0120.00616.67
7.2.320.0070.01016.79
7.2.310.0100.01316.89
7.2.300.0120.00816.74
7.2.290.0160.00016.57
7.2.130.0480.00715.09
7.2.120.0110.00715.12
7.2.110.0340.00314.79
7.2.100.0130.00415.10
7.2.90.0250.00415.10
7.2.80.0440.00714.80
7.2.70.0380.01115.30
7.2.60.0520.00014.92
7.2.50.0480.00314.85
7.2.40.0550.00714.84
7.2.30.0510.00714.98
7.2.20.0170.00414.91
7.2.10.0720.00716.71
7.2.00.0120.00818.31
7.1.250.0410.00313.75
7.1.240.0380.00714.03
7.1.230.0440.00013.92
7.1.220.0480.00613.91
7.1.210.0500.01014.00
7.1.200.0160.00314.05
7.1.190.0380.00313.98
7.1.180.0390.00413.70
7.1.170.0500.01013.65
7.1.160.0100.00913.82
7.1.150.0410.01013.95
7.1.140.6590.00315.79
7.1.130.0560.01015.67
7.1.120.0050.01315.62
7.1.110.0110.00615.78
7.1.100.0060.00816.74
7.1.90.0090.00915.66
7.1.80.0020.01215.44
7.1.70.0100.00616.44
7.1.60.0130.00817.52
7.1.50.0100.00316.31
7.1.40.0130.00816.02
7.1.30.0080.00815.55
7.1.20.0120.00815.68
7.1.10.0100.00815.57
7.1.00.0030.03418.96
7.0.330.0410.00613.63
7.0.320.0100.01013.46
7.0.310.0090.00613.85
7.0.300.0460.00713.33
7.0.290.0560.00613.74
7.0.280.0490.00013.57
7.0.270.1080.00315.29
7.0.260.0150.00015.45
7.0.250.0140.00414.95
7.0.240.0000.01315.09
7.0.230.0090.00615.14
7.0.220.0000.01415.65
7.0.210.0190.00015.42
7.0.200.0200.00714.87
7.0.190.0090.00915.48
7.0.180.0100.00515.22
7.0.170.0100.00515.24
7.0.160.0090.00615.26
7.0.150.0080.00815.22
7.0.140.0050.04218.69
7.0.130.0090.00915.50
7.0.120.0070.03918.80
7.0.110.0070.01015.21
7.0.100.0140.00315.25
7.0.90.0040.01415.38
7.0.80.0070.01015.55
7.0.70.0070.00715.30
7.0.60.0090.04117.63
7.0.50.0060.02516.60
7.0.40.0080.04016.80
7.0.30.0310.03916.80
7.0.20.0170.04416.80
7.0.10.0080.02216.79
7.0.00.0070.04716.86
5.6.380.0040.00814.27
5.6.370.0050.00514.18
5.6.360.0110.00014.25
5.6.350.0060.00614.51
5.6.340.0130.00314.39
5.6.330.0040.00913.98
5.6.320.0100.00614.37
5.6.310.0100.00414.17
5.6.300.0210.00014.18
5.6.290.0150.00314.52
5.6.280.0040.03917.68
5.6.270.0080.00914.42
5.6.260.0090.01014.14
5.6.250.0050.01014.26
5.6.240.0130.00314.14
5.6.230.0070.00714.52
5.6.220.0050.01014.33
5.6.210.0040.02417.39
5.6.200.0080.03616.11
5.6.190.0070.02717.35
5.6.180.0140.03417.43
5.6.170.0230.03717.29
5.6.160.0070.03417.30
5.6.150.0080.02516.22
5.6.140.0040.02516.24
5.6.130.0080.03316.22
5.6.120.0020.03117.69
5.6.110.0100.03917.65
5.6.100.0120.04317.57
5.6.90.0090.04217.79
5.6.80.0180.02317.34
5.6.70.2130.02417.38
5.6.60.0060.01014.30
5.6.50.0100.00713.96
5.6.40.0130.00614.14
5.6.30.0150.00414.00
5.6.20.0140.00514.54
5.6.10.0160.00014.06
5.6.00.0090.00914.07
5.5.380.0070.00311.17
5.5.370.0050.00310.90
5.5.360.0000.00711.24
5.5.350.0050.02715.83
5.5.340.0060.03814.46
5.5.330.0030.03915.76
5.5.320.0130.02515.85
5.5.310.0190.02415.70
5.5.300.0020.02514.52
5.5.290.0080.02714.59
5.5.280.0030.04316.07
5.5.270.0070.02415.99
5.5.260.0050.02716.19
5.5.250.0060.02215.81
5.5.240.0220.03515.70
5.5.230.0060.00311.11
5.5.220.0000.00711.12
5.5.210.0050.00311.07
5.5.200.0000.01111.10
5.5.190.0040.00811.21
5.5.180.0000.01611.05
5.5.170.0060.00310.82
5.5.160.0100.00010.90
5.5.150.0050.00310.95
5.5.140.0000.01210.68
5.5.130.0050.00310.79
5.5.120.0060.00311.04
5.5.110.0080.00010.78
5.5.100.0060.00311.30
5.5.90.0070.00310.81
5.5.80.0040.00811.08
5.5.70.0080.00311.13
5.5.60.0100.00411.20
5.5.50.0180.00311.05
5.5.40.0200.00010.92
5.5.30.0190.00610.97
5.5.20.0220.00310.99
5.5.10.0290.00010.98
5.5.00.0090.01310.62
5.4.450.0160.01815.08
5.4.440.0140.02415.05
5.4.430.0190.02115.29
5.4.420.0200.01915.07
5.4.410.0150.02615.11
5.4.400.0210.01815.09
5.4.390.0200.04214.89
5.4.380.0210.03515.11
5.4.370.0180.03015.05
5.4.360.0210.02114.92
5.4.350.0200.03215.08
5.4.340.0200.03314.96
5.4.330.0110.00010.80
5.4.320.0170.02514.87
5.4.310.0190.01915.05
5.4.300.0250.03614.78
5.4.290.0150.03014.98
5.4.280.0220.03114.86
5.4.270.0200.03715.05
5.4.260.0240.03314.93
5.4.250.0240.02214.81
5.4.240.0230.03314.97
5.4.230.0290.03214.79
5.4.220.0280.02614.99
5.4.210.0240.02514.94
5.4.200.0270.03815.07
5.4.190.0420.01714.92
5.4.180.0290.03514.92
5.4.170.0360.03614.92
5.4.160.0330.02514.98
5.4.150.0270.03714.96
5.4.140.0370.02813.80
5.4.130.0230.02313.69
5.4.120.0320.02813.71
5.4.110.0320.03613.55
5.4.100.0340.02313.76
5.4.90.0220.02813.57
5.4.80.0190.02013.79
5.4.70.0250.03313.75
5.4.60.0220.03213.72
5.4.50.0280.03113.69
5.4.40.0190.02213.64
5.4.30.0200.03513.72
5.4.20.0150.02913.54
5.4.10.0130.04313.61
5.4.00.0190.02513.37
5.3.290.0190.03712.72
5.3.280.0270.03812.49
5.3.270.0230.02312.46
5.3.260.0160.02412.58
5.3.250.0190.03912.73
5.3.240.0260.03912.60
5.3.230.0220.03812.56
5.3.220.0270.03312.47
5.3.210.0180.04112.45
5.3.200.0190.04012.49
5.3.190.0180.02412.59
5.3.180.0200.01612.52
5.3.170.0160.02612.64
5.3.160.0210.03512.55
5.3.150.0350.01712.52
5.3.140.0160.04012.50
5.3.130.0230.03512.62
5.3.120.0240.03012.51
5.3.110.0200.03612.54
5.3.100.0250.03012.27
5.3.90.0140.02412.19
5.3.80.0190.02912.22
5.3.70.0200.03012.25
5.3.60.0230.03212.46
5.3.50.0190.02512.16
5.3.40.0190.03612.05
5.3.30.0230.02312.36
5.3.20.0230.03512.17
5.3.10.0220.01712.16
5.3.00.0180.02912.05
5.2.170.0170.02610.35
5.2.160.0150.01810.30
5.2.150.0130.03410.33
5.2.140.0160.03310.37
5.2.130.0190.01310.08
5.2.120.0180.02710.35
5.2.110.0150.03210.23
5.2.100.0220.02310.12
5.2.90.0170.02610.21
5.2.80.0140.01710.13
5.2.70.0170.02910.17
5.2.60.0180.03010.11
5.2.50.0160.03110.07
5.2.40.0150.02010.24
5.2.30.0170.02510.13
5.2.20.0180.01610.11
5.2.10.0130.0239.98
5.2.00.0180.0259.97
5.1.60.0190.0179.19
5.1.50.0160.0179.13
5.1.40.0120.0269.28
5.1.30.0110.0219.35
5.1.20.0150.0259.37
5.1.10.0160.0299.42
5.1.00.0260.0309.29
5.0.50.0070.0208.45
5.0.40.0080.0138.41
5.0.30.0090.0328.27
5.0.20.0050.0188.31
5.0.10.0080.0128.28
5.0.00.0090.0178.25
4.4.90.0070.0197.96
4.4.80.0070.0127.96
4.4.70.0070.0127.96
4.4.60.0080.0127.96
4.4.50.0050.0147.96
4.4.40.0080.0277.96
4.4.30.0050.0217.96
4.4.20.0060.0127.96
4.4.10.0120.0157.96
4.4.00.0100.0227.96
4.3.110.0060.0227.96
4.3.100.0100.0077.96
4.3.90.0090.0197.96
4.3.80.0100.0147.96
4.3.70.0100.0177.96
4.3.60.0130.0127.96
4.3.50.0070.0127.96
4.3.40.0100.0127.96
4.3.30.0050.0137.96
4.3.20.0020.0147.96
4.3.10.0040.0127.96
4.3.00.0050.0187.96

preferences:
48.26 ms | 400 KiB | 5 Q