3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str_contains_eval( $show = '' ) { if ( str_contains( $show, 'url' ) || str_contains( $show, 'directory' ) || str_contains( $show, 'home' ) ) {} } function preg_match_eval( $show = '' ) { if ( preg_match( '/url|directory|home/', $show ) ) {} } $its = 1e3; $t = hrtime(true); for ( $i=0;$i++<$its;) $z = str_contains_eval( 'blogname' ); echo (hrtime(true)-$t)/1e9,"s\n"; $t = hrtime(true); for ( $i=0;$i++<$its;) $z = preg_match_eval( 'blogname' ); echo (hrtime(true)-$t)/1e9,"s\n"; echo "\n=== Warmed up ===\n\n"; $its = 1e5; $t = hrtime(true); for ( $i=0;$i++<$its;) $z = str_contains_eval( 'blogname' ); echo 'str_contains chain: ', $a=(hrtime(true)-$t)/1e9,"s\n"; $t = hrtime(true); for ( $i=0;$i++<$its;) $z = preg_match_eval( 'blogname' ); echo 'preg_match : ', $b=(hrtime(true)-$t)/1e9,"s\n"; echo 'preg_match is ', number_format((($a-$b)/$a) * 100, 2 ), "% faster than str_contains chain\n";
Output for 8.4.2
0.000122379s 0.000288209s === Warmed up === str_contains chain: 0.010502867s preg_match : 0.011483932s preg_match is -9.34% faster than str_contains chain
Output for 8.4.1
5.1319E-5s 0.000104049s === Warmed up === str_contains chain: 0.004603655s preg_match : 0.004436097s preg_match is 3.64% faster than str_contains chain
Output for 8.3.15
0.00013845s 0.000241748s === Warmed up === str_contains chain: 0.011355935s preg_match : 0.007577959s preg_match is 33.27% faster than str_contains chain
Output for 8.3.14
0.000117549s 0.000179798s === Warmed up === str_contains chain: 0.011363036s preg_match : 0.005018307s preg_match is 55.84% faster than str_contains chain
Output for 8.3.13
0.00014659s 0.000256734s === Warmed up === str_contains chain: 0.013352644s preg_match : 0.012652225s preg_match is 5.25% faster than str_contains chain
Output for 8.3.12
6.3066E-5s 0.000120602s === Warmed up === str_contains chain: 0.005570872s preg_match : 0.005081895s preg_match is 8.78% faster than str_contains chain
Output for 8.3.11
0.000118759s 0.00020515s === Warmed up === str_contains chain: 0.010796627s preg_match : 0.005025802s preg_match is 53.45% faster than str_contains chain
Output for 8.3.10
5.7596E-5s 0.000113131s === Warmed up === str_contains chain: 0.005212289s preg_match : 0.005218127s preg_match is -0.11% faster than str_contains chain
Output for 8.3.9
5.9469E-5s 0.000112679s === Warmed up === str_contains chain: 0.005583943s preg_match : 0.005072334s preg_match is 9.16% faster than str_contains chain
Output for 8.3.8
6.9742E-5s 0.000124804s === Warmed up === str_contains chain: 0.007004308s preg_match : 0.006498652s preg_match is 7.22% faster than str_contains chain
Output for 8.3.7
0.000126591s 0.000184257s === Warmed up === str_contains chain: 0.010372161s preg_match : 0.009340245s preg_match is 9.95% faster than str_contains chain
Output for 8.3.6
0.000109215s 0.000198389s === Warmed up === str_contains chain: 0.010170162s preg_match : 0.009565932s preg_match is 5.94% faster than str_contains chain
Output for 8.3.5
0.000135814s 0.000235875s === Warmed up === str_contains chain: 0.013534231s preg_match : 0.012857732s preg_match is 5.00% faster than str_contains chain
Output for 8.3.4
0.000103776s 0.000185399s === Warmed up === str_contains chain: 0.010449285s preg_match : 0.009460618s preg_match is 9.46% faster than str_contains chain
Output for 8.3.3
0.000137928s 0.000255835s === Warmed up === str_contains chain: 0.012800632s preg_match : 0.012241159s preg_match is 4.37% faster than str_contains chain
Output for 8.3.2
5.6004E-5s 0.000106902s === Warmed up === str_contains chain: 0.005893329s preg_match : 0.005051944s preg_match is 14.28% faster than str_contains chain
Output for 8.3.1
5.5283E-5s 0.000102264s === Warmed up === str_contains chain: 0.005459364s preg_match : 0.00529678s preg_match is 2.98% faster than str_contains chain
Output for 8.3.0
5.8077E-5s 9.9661E-5s === Warmed up === str_contains chain: 0.005428303s preg_match : 0.005136715s preg_match is 5.37% faster than str_contains chain
Output for 8.2.27
0.00012979s 0.000259398s === Warmed up === str_contains chain: 0.011267589s preg_match : 0.007148375s preg_match is 36.56% faster than str_contains chain
Output for 8.2.26
0.000186467s 0.000335307s === Warmed up === str_contains chain: 0.014798792s preg_match : 0.011687976s preg_match is 21.02% faster than str_contains chain
Output for 8.2.25
5.5013E-5s 0.00010722s === Warmed up === str_contains chain: 0.005677945s preg_match : 0.005319186s preg_match is 6.32% faster than str_contains chain
Output for 8.2.24
0.000139911s 0.000249226s === Warmed up === str_contains chain: 0.011745646s preg_match : 0.005918247s preg_match is 49.61% faster than str_contains chain
Output for 8.2.23
5.4883E-5s 0.000104788s === Warmed up === str_contains chain: 0.00529978s preg_match : 0.005019659s preg_match is 5.29% faster than str_contains chain
Output for 8.2.22
0.000114733s 0.000189566s === Warmed up === str_contains chain: 0.011085212s preg_match : 0.010461832s preg_match is 5.62% faster than str_contains chain
Output for 8.2.21
0.000130586s 0.000223606s === Warmed up === str_contains chain: 0.013527769s preg_match : 0.012616028s preg_match is 6.74% faster than str_contains chain
Output for 8.2.20
6.6825E-5s 0.000130706s === Warmed up === str_contains chain: 0.007669281s preg_match : 0.006819901s preg_match is 11.08% faster than str_contains chain
Output for 8.2.19
0.000111509s 0.000210458s === Warmed up === str_contains chain: 0.011842889s preg_match : 0.013097069s preg_match is -10.59% faster than str_contains chain
Output for 8.2.18
0.000130868s 0.000273272s === Warmed up === str_contains chain: 0.013164347s preg_match : 0.01037333s preg_match is 21.20% faster than str_contains chain
Output for 8.2.17
0.000111027s 0.000202584s === Warmed up === str_contains chain: 0.01041703s preg_match : 0.009713041s preg_match is 6.76% faster than str_contains chain
Output for 8.2.16
0.000151628s 0.000218038s === Warmed up === str_contains chain: 0.012801722s preg_match : 0.009651982s preg_match is 24.60% faster than str_contains chain
Output for 8.2.15
5.4992E-5s 0.000102334s === Warmed up === str_contains chain: 0.005385679s preg_match : 0.005219479s preg_match is 3.09% faster than str_contains chain
Output for 8.2.14
5.8678E-5s 0.000101073s === Warmed up === str_contains chain: 0.005469938s preg_match : 0.00507294s preg_match is 7.26% faster than str_contains chain
Output for 8.2.13
5.4152E-5s 9.7136E-5s === Warmed up === str_contains chain: 0.005272109s preg_match : 0.005283496s preg_match is -0.22% faster than str_contains chain
Output for 8.2.12
5.6224E-5s 9.6977E-5s === Warmed up === str_contains chain: 0.005384854s preg_match : 0.005074807s preg_match is 5.76% faster than str_contains chain
Output for 8.2.11
9.5114E-5s 0.000127131s === Warmed up === str_contains chain: 0.009488673s preg_match : 0.007690889s preg_match is 18.95% faster than str_contains chain
Output for 8.2.10
8.2726E-5s 0.000178256s === Warmed up === str_contains chain: 0.007791712s preg_match : 0.007353797s preg_match is 5.62% faster than str_contains chain
Output for 8.2.9
8.5461E-5s 0.000226145s === Warmed up === str_contains chain: 0.007196501s preg_match : 0.007482048s preg_match is -3.97% faster than str_contains chain
Output for 8.2.8
7.8497E-5s 0.000155222s === Warmed up === str_contains chain: 0.006916043s preg_match : 0.007122833s preg_match is -2.99% faster than str_contains chain
Output for 8.2.7
8.5261E-5s 0.00016978s === Warmed up === str_contains chain: 0.007186994s preg_match : 0.007394633s preg_match is -2.89% faster than str_contains chain
Output for 8.2.6
0.000123763s 0.000203614s === Warmed up === str_contains chain: 0.007430261s preg_match : 0.007205457s preg_match is 3.03% faster than str_contains chain
Output for 8.2.5
7.966E-5s 0.000157487s === Warmed up === str_contains chain: 0.006926913s preg_match : 0.007993611s preg_match is -15.40% faster than str_contains chain
Output for 8.2.4
7.5592E-5s 0.000232959s === Warmed up === str_contains chain: 0.006854647s preg_match : 0.007570755s preg_match is -10.45% faster than str_contains chain
Output for 8.2.3
7.7326E-5s 0.000155543s === Warmed up === str_contains chain: 0.007148992s preg_match : 0.007292151s preg_match is -2.00% faster than str_contains chain
Output for 8.2.2
8.3517E-5s 0.000194696s === Warmed up === str_contains chain: 0.0079345s preg_match : 0.007494511s preg_match is 5.55% faster than str_contains chain
Output for 8.2.1
8.1462E-5s 0.000153789s === Warmed up === str_contains chain: 0.007060194s preg_match : 0.007213544s preg_match is -2.17% faster than str_contains chain
Output for 8.2.0
7.9469E-5s 0.00015421s === Warmed up === str_contains chain: 0.007146347s preg_match : 0.007538605s preg_match is -5.49% faster than str_contains chain
Output for 8.1.31
0.000111257s 0.000170438s === Warmed up === str_contains chain: 0.011242385s preg_match : 0.00973429s preg_match is 13.41% faster than str_contains chain
Output for 8.1.30
0.000142817s 0.000250879s === Warmed up === str_contains chain: 0.012778513s preg_match : 0.010435093s preg_match is 18.34% faster than str_contains chain
Output for 8.1.29
9.8574E-5s 0.000176391s === Warmed up === str_contains chain: 0.009593865s preg_match : 0.010035352s preg_match is -4.60% faster than str_contains chain
Output for 8.1.28
0.000125279s 0.000287514s === Warmed up === str_contains chain: 0.013035573s preg_match : 0.012173323s preg_match is 6.61% faster than str_contains chain
Output for 8.1.27
6.0011E-5s 0.000107643s === Warmed up === str_contains chain: 0.006081111s preg_match : 0.005331111s preg_match is 12.33% faster than str_contains chain
Output for 8.1.26
5.8267E-5s 9.7558E-5s === Warmed up === str_contains chain: 0.005728995s preg_match : 0.005107138s preg_match is 10.85% faster than str_contains chain
Output for 8.1.25
5.9099E-5s 9.4091E-5s === Warmed up === str_contains chain: 0.005882089s preg_match : 0.005106789s preg_match is 13.18% faster than str_contains chain
Output for 8.1.24
0.000114212s 0.000140441s === Warmed up === str_contains chain: 0.009270848s preg_match : 0.007908586s preg_match is 14.69% faster than str_contains chain
Output for 8.1.23
7.5101E-5s 0.000198713s === Warmed up === str_contains chain: 0.006998659s preg_match : 0.008786532s preg_match is -25.55% faster than str_contains chain
Output for 8.1.22
8.5591E-5s 0.000161734s === Warmed up === str_contains chain: 0.007377532s preg_match : 0.008573322s preg_match is -16.21% faster than str_contains chain
Output for 8.1.21
7.5592E-5s 0.000159791s === Warmed up === str_contains chain: 0.007437043s preg_match : 0.007231958s preg_match is 2.76% faster than str_contains chain
Output for 8.1.20
7.8668E-5s 0.000137399s === Warmed up === str_contains chain: 0.007236705s preg_match : 0.006925681s preg_match is 4.30% faster than str_contains chain
Output for 8.1.19
8.0322E-5s 0.000183345s === Warmed up === str_contains chain: 0.007034236s preg_match : 0.007074922s preg_match is -0.58% faster than str_contains chain
Output for 8.1.18
7.929E-5s 0.00014342s === Warmed up === str_contains chain: 0.007203655s preg_match : 0.007868556s preg_match is -9.23% faster than str_contains chain
Output for 8.1.17
8.483E-5s 0.000145373s === Warmed up === str_contains chain: 0.00771173s preg_match : 0.007480376s preg_match is 3.00% faster than str_contains chain
Output for 8.1.16
7.7114E-5s 0.00014355s === Warmed up === str_contains chain: 0.007094839s preg_match : 0.007098917s preg_match is -0.06% faster than str_contains chain
Output for 8.1.15
7.8317E-5s 0.00014322s === Warmed up === str_contains chain: 0.006985534s preg_match : 0.007050116s preg_match is -0.92% faster than str_contains chain
Output for 8.1.14
7.8879E-5s 0.000152226s === Warmed up === str_contains chain: 0.007302279s preg_match : 0.008297573s preg_match is -13.63% faster than str_contains chain
Output for 8.1.13
0.000106741s 0.000161143s === Warmed up === str_contains chain: 0.007058442s preg_match : 0.008526423s preg_match is -20.80% faster than str_contains chain
Output for 8.1.12
8.2775E-5s 0.000166503s === Warmed up === str_contains chain: 0.007298322s preg_match : 0.008756777s preg_match is -19.98% faster than str_contains chain
Output for 8.1.11
8.7944E-5s 0.000171192s === Warmed up === str_contains chain: 0.007511704s preg_match : 0.007043834s preg_match is 6.23% faster than str_contains chain
Output for 8.1.10
7.8047E-5s 0.00024434s === Warmed up === str_contains chain: 0.00713693s preg_match : 0.007057168s preg_match is 1.12% faster than str_contains chain
Output for 8.1.9
0.000110337s 0.000193514s === Warmed up === str_contains chain: 0.007461539s preg_match : 0.010152854s preg_match is -36.07% faster than str_contains chain
Output for 8.1.8
8.3688E-5s 0.000217569s === Warmed up === str_contains chain: 0.006862994s preg_match : 0.006911133s preg_match is -0.70% faster than str_contains chain
Output for 8.1.7
7.8208E-5s 0.000155402s === Warmed up === str_contains chain: 0.007014939s preg_match : 0.007898682s preg_match is -12.60% faster than str_contains chain
Output for 8.1.6
8.3326E-5s 0.000195137s === Warmed up === str_contains chain: 0.007323138s preg_match : 0.008549157s preg_match is -16.74% faster than str_contains chain
Output for 8.1.5
7.0091E-5s 0.000147798s === Warmed up === str_contains chain: 0.00705184s preg_match : 0.007503489s preg_match is -6.40% faster than str_contains chain
Output for 8.1.4
7.1504E-5s 0.000170821s === Warmed up === str_contains chain: 0.007385887s preg_match : 0.008902512s preg_match is -20.53% faster than str_contains chain
Output for 8.1.3
8.0933E-5s 0.000231324s === Warmed up === str_contains chain: 0.007042751s preg_match : 0.008143172s preg_match is -15.62% faster than str_contains chain
Output for 8.1.2
8.1063E-5s 0.000202161s === Warmed up === str_contains chain: 0.007421124s preg_match : 0.008709116s preg_match is -17.36% faster than str_contains chain
Output for 8.1.1
9.9177E-5s 0.000162225s === Warmed up === str_contains chain: 0.007224994s preg_match : 0.008329322s preg_match is -15.28% faster than str_contains chain
Output for 8.1.0
7.5753E-5s 0.000174138s === Warmed up === str_contains chain: 0.007828701s preg_match : 0.00823769s preg_match is -5.22% faster than str_contains chain
Output for 8.0.30
7.5513E-5s 0.000165331s === Warmed up === str_contains chain: 0.007363496s preg_match : 0.007913971s preg_match is -7.48% faster than str_contains chain
Output for 8.0.29
0.001248259s 0.000296418s === Warmed up === str_contains chain: 0.007850252s preg_match : 0.008177798s preg_match is -4.17% faster than str_contains chain
Output for 8.0.28
0.001335643s 0.000154069s === Warmed up === str_contains chain: 0.008578291s preg_match : 0.007871421s preg_match is 8.24% faster than str_contains chain
Output for 8.0.27
0.001292282s 0.000194637s === Warmed up === str_contains chain: 0.008053424s preg_match : 0.008001065s preg_match is 0.65% faster than str_contains chain
Output for 8.0.26
0.001490495s 0.000148028s === Warmed up === str_contains chain: 0.008389855s preg_match : 0.007755103s preg_match is 7.57% faster than str_contains chain
Output for 8.0.25
0.001248449s 0.00020681s === Warmed up === str_contains chain: 0.008018758s preg_match : 0.007218863s preg_match is 9.98% faster than str_contains chain
Output for 8.0.24
0.001523957s 0.000186631s === Warmed up === str_contains chain: 0.007877452s preg_match : 0.008016354s preg_match is -1.76% faster than str_contains chain
Output for 8.0.23
8.7695E-5s 0.000144371s === Warmed up === str_contains chain: 0.007717061s preg_match : 0.007196652s preg_match is 6.74% faster than str_contains chain
Output for 8.0.22
0.000109506s 0.000320934s === Warmed up === str_contains chain: 0.008406518s preg_match : 0.007912267s preg_match is 5.88% faster than str_contains chain
Output for 8.0.21
0.000109246s 0.000201649s === Warmed up === str_contains chain: 0.007846524s preg_match : 0.007427475s preg_match is 5.34% faster than str_contains chain
Output for 8.0.20
8.3777E-5s 0.000189837s === Warmed up === str_contains chain: 0.007805326s preg_match : 0.007135687s preg_match is 8.58% faster than str_contains chain
Output for 8.0.19
8.1283E-5s 0.000184959s === Warmed up === str_contains chain: 0.007972951s preg_match : 0.007365608s preg_match is 7.62% faster than str_contains chain
Output for 8.0.18
8.9869E-5s 0.000261252s === Warmed up === str_contains chain: 0.008369448s preg_match : 0.00785522s preg_match is 6.14% faster than str_contains chain
Output for 8.0.17
8.1554E-5s 0.000152317s === Warmed up === str_contains chain: 0.008129477s preg_match : 0.007247938s preg_match is 10.84% faster than str_contains chain
Output for 8.0.16
0.000108414s 0.00018654s === Warmed up === str_contains chain: 0.007650105s preg_match : 0.007400766s preg_match is 3.26% faster than str_contains chain
Output for 8.0.15
6.7708E-5s 0.000147488s === Warmed up === str_contains chain: 0.006139772s preg_match : 0.00767399s preg_match is -24.99% faster than str_contains chain
Output for 8.0.14
8.3066E-5s 0.00015434s === Warmed up === str_contains chain: 0.007497929s preg_match : 0.007210928s preg_match is 3.83% faster than str_contains chain
Output for 8.0.13
6.8328E-5s 0.000155814s === Warmed up === str_contains chain: 0.006485493s preg_match : 0.008549316s preg_match is -31.82% faster than str_contains chain
Output for 8.0.12
0.000108724s 0.000208882s === Warmed up === str_contains chain: 0.007766092s preg_match : 0.008548996s preg_match is -10.08% faster than str_contains chain
Output for 8.0.11
0.00011156s 0.000184647s === Warmed up === str_contains chain: 0.007691823s preg_match : 0.008974547s preg_match is -16.68% faster than str_contains chain
Output for 8.0.10
8.5802E-5s 0.000196179s === Warmed up === str_contains chain: 0.007825845s preg_match : 0.008082779s preg_match is -3.28% faster than str_contains chain
Output for 8.0.9
8.0441E-5s 0.000210355s === Warmed up === str_contains chain: 0.007756384s preg_match : 0.008373354s preg_match is -7.95% faster than str_contains chain
Output for 8.0.8
8.8617E-5s 0.000189095s === Warmed up === str_contains chain: 0.008090774s preg_match : 0.007358875s preg_match is 9.05% faster than str_contains chain
Output for 8.0.7
8.7914E-5s 0.000174148s === Warmed up === str_contains chain: 0.008375208s preg_match : 0.007780129s preg_match is 7.11% faster than str_contains chain
Output for 8.0.6
7.5833E-5s 0.00016441s === Warmed up === str_contains chain: 0.006902407s preg_match : 0.008223915s preg_match is -19.15% faster than str_contains chain
Output for 8.0.5
7.5262E-5s 0.000151385s === Warmed up === str_contains chain: 0.007299474s preg_match : 0.008631381s preg_match is -18.25% faster than str_contains chain
Output for 8.0.3
8.0923E-5s 0.000152206s === Warmed up === str_contains chain: 0.007449817s preg_match : 0.008120219s preg_match is -9.00% faster than str_contains chain
Output for 8.0.2
7.8318E-5s 0.000156364s === Warmed up === str_contains chain: 0.007263898s preg_match : 0.007359256s preg_match is -1.31% faster than str_contains chain
Output for 8.0.1
8.9017E-5s 0.001394493s === Warmed up === str_contains chain: 0.009022457s preg_match : 0.007490614s preg_match is 16.98% faster than str_contains chain

preferences:
67.36 ms | 567 KiB | 5 Q