3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'The value of the field ā€˜%sā€™ ' . 'must match the pattern ā€˜%sā€™.'; $field = 'field'; $pattern = '@^[a-z0-9_]+$@i'; echo sprintf($text, $field, $pattern);

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.0160.00616.58
8.3.60.0110.00418.31
8.3.50.0150.00322.92
8.3.40.0210.00018.71
8.3.30.0070.01119.14
8.3.20.0070.00020.10
8.3.10.0080.00021.94
8.3.00.0030.00619.38
8.2.180.0220.00018.16
8.2.170.0120.00322.96
8.2.160.0140.00020.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0000.01421.00
8.2.110.0100.00022.08
8.2.100.0060.00617.63
8.2.90.0000.00819.08
8.2.80.0080.00017.97
8.2.70.0040.00417.49
8.2.60.0000.00718.03
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0000.00818.05
8.2.20.0040.00417.63
8.2.10.0070.00018.04
8.2.00.0040.00417.49
8.1.280.0110.00425.92
8.1.270.0000.00822.08
8.1.260.0040.00426.35
8.1.250.0120.00328.09
8.1.240.0000.00922.07
8.1.230.0110.00019.04
8.1.220.0030.00617.74
8.1.210.0030.00618.77
8.1.200.0070.00617.35
8.1.190.0030.00617.10
8.1.180.0080.00018.10
8.1.170.0030.00618.36
8.1.160.0040.00422.02
8.1.150.0040.00418.81
8.1.140.0070.00017.35
8.1.130.0030.00317.86
8.1.120.0030.00317.41
8.1.110.0020.00517.41
8.1.100.0000.00717.48
8.1.90.0040.00417.28
8.1.80.0040.00417.41
8.1.70.0000.00717.32
8.1.60.0060.00317.40
8.1.50.0000.00817.45
8.1.40.0070.00017.41
8.1.30.0080.00017.57
8.1.20.0050.00317.49
8.1.10.0060.00317.50
8.1.00.0050.00317.32
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00318.39
8.0.270.0000.00717.25
8.0.260.0000.00617.25
8.0.250.0000.00716.83
8.0.240.0030.00316.97
8.0.230.0000.00716.87
8.0.220.0000.00616.78
8.0.210.0000.00716.73
8.0.200.0000.00716.86
8.0.190.0080.00016.88
8.0.180.0040.00416.87
8.0.170.0040.00416.74
8.0.160.0000.00816.79
8.0.150.0080.00016.67
8.0.140.0040.00416.77
8.0.130.0050.00013.29
8.0.120.0040.00416.79
8.0.110.0070.00016.87
8.0.100.0070.00016.82
8.0.90.0070.00016.71
8.0.80.0060.00916.84
8.0.70.0020.00516.77
8.0.60.0040.00416.72
8.0.50.0040.00416.93
8.0.30.0140.01117.03
8.0.20.0120.00717.40
8.0.10.0030.00516.99
8.0.00.0080.00916.88
7.4.330.0050.00015.04
7.4.320.0030.00316.43
7.4.300.0030.00316.44
7.4.290.0000.00916.51
7.4.280.0000.00916.33
7.4.270.0000.00716.37
7.4.260.0070.00316.55
7.4.250.0070.00016.35
7.4.240.0050.00216.56
7.4.230.0030.00316.28
7.4.220.0140.00316.50
7.4.210.0110.00416.51
7.4.200.0000.00716.32
7.4.160.0000.01716.29
7.4.150.0090.00917.40
7.4.140.0150.01017.86
7.4.130.0110.00516.34
7.4.120.0090.01316.37
7.4.110.0130.00816.43
7.4.100.0070.01116.48
7.4.90.0100.00716.55
7.4.80.0100.01319.39
7.4.70.0030.01216.45
7.4.60.0040.01416.30
7.4.50.0040.00416.39
7.4.40.0100.01016.39
7.4.30.0040.01116.20
7.4.00.0110.00314.92
7.3.330.0030.00312.88
7.3.320.0030.00312.85
7.3.310.0060.00016.17
7.3.300.0030.00316.17
7.3.290.0120.00916.09
7.3.280.0070.01016.11
7.3.270.0070.01117.40
7.3.260.0140.00916.15
7.3.250.0120.00716.49
7.3.240.0080.00816.42
7.3.230.0070.01016.41
7.3.210.0100.00716.43
7.3.200.0130.00319.39
7.3.190.0100.00616.15
7.3.180.0150.00016.45
7.3.170.0160.00016.27
7.3.160.0080.00816.22
7.2.330.0090.00816.52
7.2.320.0130.00616.54
7.2.310.0110.00616.26
7.2.300.0030.01616.62
7.2.290.0130.00316.33
7.2.00.0030.00919.37
7.1.100.0170.01017.97
7.1.70.0030.00517.13
7.1.60.0100.01319.40
7.1.50.0060.00616.72
7.1.00.0070.07322.43
7.0.200.0070.00716.88
7.0.140.0070.07322.20
7.0.60.0030.06319.93
7.0.50.0100.08017.84
7.0.40.0100.05719.96
7.0.30.0300.06320.00
7.0.20.0200.05320.33
7.0.10.0070.04020.01
7.0.00.0130.03320.20
5.6.280.0030.07321.03
5.6.210.0000.08320.59
5.6.200.0070.04318.21
5.6.190.0070.05020.43
5.6.180.0300.06320.67
5.6.170.0270.04020.43
5.6.160.0030.04020.61
5.6.150.0100.08018.15
5.6.140.0100.04018.10
5.6.130.0170.07718.11
5.6.120.0100.07721.04
5.6.110.0170.07020.88
5.6.100.0070.04721.01
5.6.90.0130.08021.11
5.6.80.0100.06720.53
5.5.350.0000.03320.29
5.5.340.0100.07017.98
5.5.330.0070.08020.42
5.5.320.0330.05720.28
5.5.310.0300.07720.17
5.5.300.0070.07717.88
5.5.290.0130.06317.91
5.5.280.0130.07320.64
5.5.270.0030.04720.75
5.5.260.0070.08320.72
5.5.250.0070.06720.68
5.5.240.0230.03320.11
5.4.450.0300.04319.25
5.4.440.0270.04319.58
5.4.430.0770.04719.38
5.4.420.0500.03019.48
5.4.410.0530.03719.28
5.4.400.0600.03718.78
5.4.390.0370.04318.89
5.4.380.0270.08718.77
5.4.370.0400.04718.70
5.4.360.0430.04018.59
5.4.350.0300.06318.68
5.4.340.0200.06018.69
5.4.320.0030.03912.45
5.4.310.0050.04912.45
5.4.300.0050.04312.45
5.4.290.0090.03812.45
5.4.280.0070.03412.35
5.4.270.0090.03812.35
5.4.260.0100.03812.34
5.4.250.0080.04412.34
5.4.240.0050.03512.34
5.4.230.0050.03812.34
5.4.220.0060.03712.34
5.4.210.0060.03912.34
5.4.200.0070.04212.34
5.4.190.0070.03412.33
5.4.180.0060.03812.34
5.4.170.0030.04112.34
5.4.160.0080.03312.34
5.4.150.0050.03612.34
5.4.140.0060.03812.02
5.4.130.0060.03812.01
5.4.120.0060.03911.97
5.4.110.0020.03811.96
5.4.100.0050.03911.96
5.4.90.0020.04111.96
5.4.80.0060.04311.96
5.4.70.0090.03111.96
5.4.60.0060.03611.96
5.4.50.0050.03511.96
5.4.40.0070.03411.95
5.4.30.0060.03711.95
5.4.20.0080.04011.95
5.4.10.0080.04111.95
5.4.00.0070.03911.43
5.3.290.0060.03912.80
5.3.280.0100.03812.71
5.3.270.0030.04112.73
5.3.260.0050.04012.72
5.3.250.0070.03712.72
5.3.240.0030.04212.72
5.3.230.0050.03812.71
5.3.220.0040.03812.68
5.3.210.0090.04012.68
5.3.200.0040.04712.68
5.3.190.0050.03812.68
5.3.180.0090.04012.67
5.3.170.0030.03812.67
5.3.160.0040.03712.67
5.3.150.0060.03612.68
5.3.140.0070.03412.66
5.3.130.0100.03412.66
5.3.120.0060.03812.66
5.3.110.0050.03812.66
5.3.100.0030.04012.12
5.3.90.0100.04112.09
5.3.80.0070.03412.08
5.3.70.0080.04012.08
5.3.60.0070.03612.06
5.3.50.0050.04412.00
5.3.40.0090.03212.00
5.3.30.0060.04111.94
5.3.20.0050.03611.72
5.3.10.0040.03611.69
5.3.00.0040.04611.68
5.2.170.0040.0309.18
5.2.160.0050.0279.18
5.2.150.0060.0369.18
5.2.140.0050.0299.17
5.2.130.0020.0319.14
5.2.120.0040.0289.13
5.2.110.0070.0269.14
5.2.100.0070.0299.14
5.2.90.0040.0399.14
5.2.80.0050.0299.13
5.2.70.0040.0299.13
5.2.60.0060.0289.09
5.2.50.0070.0379.05
5.2.40.0020.0309.03
5.2.30.0050.0329.00
5.2.20.0020.0348.99
5.2.10.0060.0328.91
5.2.00.0070.0378.77
5.1.60.0040.0348.06
5.1.50.0070.0288.05
5.1.40.0090.0258.04
5.1.30.0040.0298.39
5.1.20.0080.0288.41
5.1.10.0050.0288.13
5.1.00.0040.0298.13
5.0.50.0020.0226.61
5.0.40.0030.0196.47
5.0.30.0020.0316.29
5.0.20.0030.0196.26
5.0.10.0030.0196.23
5.0.00.0070.0316.22
4.4.90.0030.0144.78
4.4.80.0010.0164.76
4.4.70.0040.0154.75
4.4.60.0050.0234.75
4.4.50.0040.0144.77
4.4.40.0030.0264.71
4.4.30.0020.0194.76
4.4.20.0020.0164.84
4.4.10.0020.0164.85
4.4.00.0040.0234.76
4.3.110.0030.0154.67
4.3.100.0030.0144.67
4.3.90.0030.0144.63
4.3.80.0040.0224.58
4.3.70.0020.0144.63
4.3.60.0040.0134.62
4.3.50.0020.0154.63
4.3.40.0020.0244.54
4.3.30.0010.0163.28
4.3.20.0020.0153.25
4.3.10.0030.0143.22
4.3.00.0000.02315.92

preferences:
41.35 ms | 401 KiB | 5 Q