3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo ltrim('#+&!','#&!+'); $channel_name = '#someChannelName'; function isValidChannelName($name) { return preg_match('/#[\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF]+/',$name) > 0; } var_dump(isValidChannelName($channel_name));

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.0110.00418.86
8.3.30.0100.00619.05
8.3.20.0080.00020.18
8.3.10.0070.00023.71
8.3.00.0030.00619.38
8.2.170.0120.00922.96
8.2.160.0070.00720.38
8.2.150.0070.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00322.12
8.2.110.0060.00322.24
8.2.100.0120.00017.84
8.2.90.0040.00419.21
8.2.80.0040.00417.97
8.2.70.0040.00417.88
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0040.00420.20
8.2.30.0060.00318.07
8.2.20.0030.00517.91
8.2.10.0000.00718.11
8.2.00.0050.00217.88
8.1.270.0080.00023.79
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00923.91
8.1.230.0070.00419.11
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.38
8.1.180.0080.00018.10
8.1.170.0030.00518.58
8.1.160.0030.00522.03
8.1.150.0050.00318.84
8.1.140.0050.00217.50
8.1.130.0000.00717.76
8.1.120.0070.00017.50
8.1.110.0040.00417.58
8.1.100.0040.00717.64
8.1.90.0040.00417.50
8.1.80.0030.00517.63
8.1.70.0000.00717.49
8.1.60.0090.00017.76
8.1.50.0000.00817.49
8.1.40.0080.00017.55
8.1.30.0060.00317.71
8.1.20.0000.00817.70
8.1.10.0050.00217.61
8.1.00.0000.00817.50
8.0.300.0000.00818.77
8.0.290.0050.00217.28
8.0.280.0040.00418.46
8.0.270.0000.00717.30
8.0.260.0000.00717.26
8.0.250.0070.00016.97
8.0.240.0000.00717.09
8.0.230.0030.00317.05
8.0.220.0030.00417.05
8.0.210.0040.00416.91
8.0.200.0030.00317.13
8.0.190.0000.00717.15
8.0.180.0100.00016.94
8.0.170.0030.00517.00
8.0.160.0050.00216.90
8.0.150.0030.00316.93
8.0.140.0030.00516.96
8.0.130.0000.00513.41
8.0.120.0030.00616.95
8.0.110.0000.00717.00
8.0.100.0000.00717.03
8.0.90.0000.00717.03
8.0.80.0080.00816.97
8.0.70.0040.00417.07
8.0.60.0080.00016.93
8.0.50.0040.00417.09
8.0.30.0110.00817.17
8.0.20.0090.00917.40
8.0.10.0070.00016.93
8.0.00.0110.00817.01
7.4.330.0050.00015.02
7.4.320.0030.00316.80
7.4.300.0060.00016.82
7.4.290.0030.00316.77
7.4.280.0000.00716.80
7.4.270.0000.00716.71
7.4.260.0000.00716.64
7.4.250.0030.00516.75
7.4.240.0050.00216.72
7.4.230.0000.00716.92
7.4.220.0040.01216.72
7.4.210.0040.01016.69
7.4.200.0030.00316.52
7.4.190.0030.00316.79
7.4.160.0130.00316.76
7.4.150.0090.00917.40
7.4.140.0060.01117.86
7.4.130.0090.00816.67
7.4.120.0100.00716.67
7.4.110.0080.00916.52
7.4.100.0030.01716.59
7.4.90.0100.00716.67
7.4.80.0150.00919.39
7.4.70.0080.00816.83
7.4.60.0120.01116.62
7.4.50.0060.00316.75
7.4.40.0110.00616.74
7.4.30.0090.00616.60
7.4.00.0140.00315.14
7.3.330.0000.00613.20
7.3.320.0060.00013.36
7.3.310.0000.00716.45
7.3.300.0080.00016.39
7.3.290.0070.00716.44
7.3.280.0110.00716.40
7.3.270.0070.01017.40
7.3.260.0140.00316.39
7.3.250.0110.01016.42
7.3.240.0100.01416.57
7.3.230.0110.00716.74
7.3.210.0170.00016.46
7.3.200.0080.01519.39
7.3.190.0000.01816.46
7.3.180.0100.01116.73
7.3.170.0050.01116.47
7.3.160.0080.00816.46
7.3.120.0040.01114.61
7.2.330.0080.00816.82
7.2.320.0190.00316.81
7.2.310.0140.00716.79
7.2.300.0090.00916.82
7.2.290.0170.00016.96
7.2.00.0150.00419.48
7.1.100.0030.01218.61
7.1.70.0060.00617.07
7.1.60.0060.01919.46
7.1.50.0170.00716.83
7.1.00.0100.07022.32
7.0.200.0000.00716.39
7.0.140.0070.07022.12
7.0.80.0130.08319.88
7.0.70.0570.08019.98
7.0.60.0230.08320.01
7.0.50.0630.07720.29
7.0.40.0070.08020.05
7.0.30.0070.08720.11
7.0.20.0030.05720.19
7.0.10.0070.04020.10
7.0.00.0000.08020.07
5.6.280.0030.07320.78
5.6.230.0030.05720.50
5.6.220.0070.06020.47
5.6.210.0100.08020.62
5.6.200.0130.06021.12
5.6.190.0100.08021.00
5.6.180.0270.05721.01
5.6.170.0100.08720.98
5.6.160.0100.08021.05
5.6.150.0030.07021.09
5.6.140.0070.07321.13
5.6.130.0000.08321.03
5.6.120.0070.08021.08
5.6.110.0070.08321.07
5.6.100.0030.08021.01
5.6.90.0100.03721.01
5.6.80.0030.04020.40
5.6.70.0030.08020.39
5.6.60.0070.07020.48
5.6.50.0030.08720.32
5.6.40.0130.04020.37
5.6.30.0170.07020.45
5.6.20.0100.08020.39
5.6.10.0170.05020.30
5.6.00.0070.08320.34
5.5.370.0100.07720.36
5.5.360.0100.07320.36
5.5.350.0130.07020.47
5.5.340.0130.07320.65
5.5.330.0170.07320.80
5.5.320.0070.04020.84
5.5.310.0000.06720.91
5.5.300.0070.07020.91
5.5.290.0130.08020.84
5.5.280.0130.07020.64
5.5.270.0100.04320.89
5.5.260.0130.08020.89
5.5.250.0100.08320.46
5.5.240.0130.06020.29
5.5.230.0100.07320.29
5.5.220.0100.07720.13
5.5.210.0100.07720.27
5.5.200.0030.08320.24
5.5.190.0100.08020.28
5.5.180.0130.07320.27
5.5.160.0100.08320.13
5.5.150.0000.08320.14
5.5.140.0030.07719.99
5.5.130.0030.08020.08
5.5.120.0100.07320.09
5.5.110.0170.08020.14
5.5.100.0000.05320.11
5.5.90.0070.04720.17
5.5.80.0030.04720.10
5.5.70.0170.06720.08
5.5.60.0030.06720.14
5.5.50.0100.04020.07
5.5.40.0170.07720.04
5.5.30.0030.08320.15
5.5.20.0100.04720.15
5.5.10.0100.07320.04
5.5.00.0100.08020.12
5.4.450.0070.08019.20
5.4.440.0100.07319.54
5.4.430.0100.06319.55
5.4.420.0100.07319.17
5.4.410.0070.07019.38
5.4.400.0130.07319.14
5.4.390.0030.05019.13
5.4.380.0200.06319.13
5.4.370.0070.05318.85
5.4.360.0070.04319.03
5.4.350.0100.04319.16
5.4.340.0170.04019.04
5.4.320.0070.04319.23
5.4.310.0100.07319.04
5.4.300.0100.06719.03
5.4.290.0030.08019.04
5.4.280.0000.08319.05
5.4.270.0100.07318.89
5.4.260.0070.07319.13
5.4.250.0070.07718.84
5.4.240.0100.07719.22
5.4.230.0070.08019.17
5.4.220.0100.06319.08
5.4.210.0100.07319.12
5.4.200.0030.05719.13
5.4.190.0070.08019.08
5.4.180.0030.07719.11
5.4.170.0100.05019.08
5.4.160.0030.08319.16
5.4.150.0100.06019.11
5.4.140.0030.08316.41
5.4.130.0030.08016.41
5.4.120.0030.07316.42
5.4.110.0030.07016.47
5.4.100.0030.08016.29
5.4.90.0030.07016.43
5.4.80.0130.06016.47
5.4.70.0100.06716.48
5.4.60.0100.07016.48
5.4.50.0100.07316.36
5.4.40.0000.05016.37
5.4.30.0170.06016.48
5.4.20.0130.06716.40
5.4.10.0170.06716.46
5.4.00.0100.06315.91
5.3.290.0130.06014.58
5.3.280.0000.07714.57
5.3.270.0100.07314.55
5.3.260.0000.08314.74
5.3.250.0070.07014.74
5.3.240.0030.06014.69
5.3.230.0070.08014.53
5.3.220.0070.05314.68
5.3.210.0070.08014.62
5.3.200.0070.05014.63
5.3.190.0070.07014.61
5.3.180.0000.07314.61
5.3.170.0130.07014.61
5.3.160.0100.08014.68
5.3.150.0070.05014.55
5.3.140.0170.06714.50
5.3.130.0130.07014.57
5.3.120.0130.07014.52
5.3.110.0100.07314.61
5.3.100.0070.04314.07
5.3.90.0100.06713.95
5.3.80.0070.07014.07
5.3.70.0130.05714.08
5.3.60.0130.06714.07
5.3.50.0070.07013.86
5.3.40.0030.04713.96
5.3.30.0000.06713.79
5.3.20.0070.03713.67
5.3.10.0030.04713.70
5.3.00.0100.07013.79
5.2.170.0000.04311.99
5.2.160.0030.04711.99
5.2.150.0000.04011.99
5.2.140.0070.05711.99
5.2.130.0070.06011.99
5.2.120.0000.04311.99
5.2.110.0030.02711.99
5.2.100.0000.05711.99
5.2.90.0000.05311.99
5.2.80.0000.03011.99
5.2.70.0000.03011.99
5.2.60.0070.03711.99
5.2.50.0030.06011.99
5.2.40.0070.06011.99
5.2.30.0030.06011.99
5.2.20.0030.05011.99
5.2.10.0030.02711.99
5.2.00.0030.02711.99
5.1.60.0030.05011.99
5.1.50.0030.04711.99
5.1.40.0000.05711.99
5.1.30.0070.05011.99
5.1.20.0000.05711.99
5.1.10.0030.05011.99
5.1.00.0030.05711.99
5.0.50.0030.05011.99
5.0.40.0030.03711.99
5.0.30.0030.05011.99
5.0.20.0000.04011.99
5.0.10.0070.03711.99
5.0.00.0000.03311.99
4.4.90.0030.02311.99
4.4.80.0000.02011.99
4.4.70.0000.02011.99
4.4.60.0070.01311.99
4.4.50.0000.01711.99
4.4.40.0030.05011.99
4.4.30.0100.02311.99
4.4.20.0000.01711.99
4.4.10.0030.03311.99
4.4.00.0070.05311.99
4.3.110.0100.01311.99
4.3.100.0000.02011.99
4.3.90.0070.02011.99
4.3.80.0100.04011.99
4.3.70.0030.03311.99
4.3.60.0070.02711.99
4.3.50.0000.03711.99
4.3.40.0000.05311.99
4.3.30.0000.03311.99
4.3.20.0030.03311.99
4.3.10.0070.03011.99
4.3.00.0030.03311.99

preferences:
50.05 ms | 400 KiB | 5 Q