3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $v1 = 5; $v2 = '5-4'; $time = microtime(1); $i = 0; while($i++ < 1000000) donull((strcmp($v1,$v2) === 0)); echo (microtime(1)-$time)." seconds for strcmp"; echo "\n"; $time = microtime(1); $i = 0; while($i++ < 1000000) donull(((string) $v1 == (string) $v2)); echo (microtime(1)-$time)." seconds for typecasting"; function donull($v){};
Output for 7.1.0
0.021778106689453 seconds for strcmp -0.083238840103149 seconds for typecasting
Output for 7.0.14
0.14058995246887 seconds for strcmp 0.078365802764893 seconds for typecasting
Output for 7.0.10
0.13175892829895 seconds for strcmp 0.079355955123901 seconds for typecasting
Output for 7.0.9
0.11616396903992 seconds for strcmp 0.073385000228882 seconds for typecasting
Output for 7.0.8
0.12842488288879 seconds for strcmp 0.079869985580444 seconds for typecasting
Output for 7.0.7
0.1098620891571 seconds for strcmp 0.080423831939697 seconds for typecasting
Output for 7.0.6
0.095844984054565 seconds for strcmp 0.089256048202515 seconds for typecasting
Output for 7.0.5
0.12665104866028 seconds for strcmp 0.079033851623535 seconds for typecasting
Output for 7.0.4
0.10351490974426 seconds for strcmp 0.076184034347534 seconds for typecasting
Output for 7.0.3
0.13715410232544 seconds for strcmp 0.097110033035278 seconds for typecasting
Output for 7.0.2
0.11927700042725 seconds for strcmp 0.076992034912109 seconds for typecasting
Output for 7.0.1
0.12000203132629 seconds for strcmp 0.077752113342285 seconds for typecasting
Output for 7.0.0
0.1238739490509 seconds for strcmp 0.072167158126831 seconds for typecasting
Output for hhvm-3.12.0
0.35054993629456 seconds for strcmp 0.23176884651184 seconds for typecasting
Output for hhvm-3.10.0
0.3981511592865 seconds for strcmp 0.45207500457764 seconds for typecasting
Output for 5.6.28
-0.18506717681885 seconds for strcmp -0.18203091621399 seconds for typecasting
Output for 5.6.25
0.27254390716553 seconds for strcmp 0.23795104026794 seconds for typecasting
Output for 5.6.24
0.30002617835999 seconds for strcmp 0.23517203330994 seconds for typecasting
Output for 5.6.23
0.28096103668213 seconds for strcmp 0.23513603210449 seconds for typecasting
Output for 5.6.22
0.28667712211609 seconds for strcmp 0.23965311050415 seconds for typecasting
Output for 5.6.21
0.29568910598755 seconds for strcmp 0.21216702461243 seconds for typecasting
Output for 5.6.20
0.30288195610046 seconds for strcmp 0.23766493797302 seconds for typecasting
Output for 5.6.19
0.31005096435547 seconds for strcmp 0.23908495903015 seconds for typecasting
Output for 5.6.18
0.28929901123047 seconds for strcmp 0.24067616462708 seconds for typecasting
Output for 5.6.17
0.28382205963135 seconds for strcmp 0.2352249622345 seconds for typecasting
Output for 5.6.16
0.29884219169617 seconds for strcmp 0.25325202941895 seconds for typecasting
Output for 5.6.15
0.28323292732239 seconds for strcmp 0.23739695549011 seconds for typecasting
Output for 5.6.14
0.28294897079468 seconds for strcmp 0.23555397987366 seconds for typecasting
Output for 5.6.13
0.2875919342041 seconds for strcmp 0.23789191246033 seconds for typecasting
Output for 5.6.12
0.29476094245911 seconds for strcmp 0.23738408088684 seconds for typecasting
Output for 5.6.11
0.2829110622406 seconds for strcmp 0.24297690391541 seconds for typecasting
Output for 5.6.10
0.31176996231079 seconds for strcmp 0.24009895324707 seconds for typecasting
Output for 5.6.9
0.31195688247681 seconds for strcmp 0.29341721534729 seconds for typecasting
Output for 5.6.8
0.31619095802307 seconds for strcmp 0.23481106758118 seconds for typecasting
Output for 5.6.7
0.29081201553345 seconds for strcmp 0.23946595191956 seconds for typecasting
Output for 5.6.6
0.28788304328918 seconds for strcmp 0.24273085594177 seconds for typecasting
Output for 5.6.5
0.29215002059937 seconds for strcmp 0.23378491401672 seconds for typecasting
Output for 5.6.4
0.28361010551453 seconds for strcmp 0.23779892921448 seconds for typecasting
Output for 5.6.3
0.29765796661377 seconds for strcmp 0.23420715332031 seconds for typecasting
Output for 5.6.2
0.30124402046204 seconds for strcmp 0.23298716545105 seconds for typecasting
Output for 5.6.1
0.28320288658142 seconds for strcmp 0.23314094543457 seconds for typecasting
Output for 5.6.0
0.28203296661377 seconds for strcmp 0.23529505729675 seconds for typecasting
Output for 5.5.38
0.25878190994263 seconds for strcmp 0.21830701828003 seconds for typecasting
Output for 5.5.37
0.29894304275513 seconds for strcmp 0.2333550453186 seconds for typecasting
Output for 5.5.36
0.28047490119934 seconds for strcmp 0.23310995101929 seconds for typecasting
Output for 5.5.35
0.31269598007202 seconds for strcmp 0.23244500160217 seconds for typecasting
Output for 5.5.34
0.29876208305359 seconds for strcmp 0.2369441986084 seconds for typecasting
Output for 5.5.33
0.30088901519775 seconds for strcmp 0.23925995826721 seconds for typecasting
Output for 5.5.32
0.30828595161438 seconds for strcmp 0.23758983612061 seconds for typecasting
Output for 5.5.31
0.33588409423828 seconds for strcmp 0.26449799537659 seconds for typecasting
Output for 5.5.30
0.29461216926575 seconds for strcmp 0.23140001296997 seconds for typecasting
Output for 5.5.29
0.28649306297302 seconds for strcmp 0.23432302474976 seconds for typecasting
Output for 5.5.28
0.36130690574646 seconds for strcmp 0.26040601730347 seconds for typecasting
Output for 5.5.27
0.34104204177856 seconds for strcmp 0.23997616767883 seconds for typecasting
Output for 5.5.26
0.28718304634094 seconds for strcmp 0.23361110687256 seconds for typecasting
Output for 5.5.25
0.29881596565247 seconds for strcmp 0.2347559928894 seconds for typecasting
Output for 5.5.24
0.31623101234436 seconds for strcmp 0.24199414253235 seconds for typecasting
Output for 5.5.23
0.31036305427551 seconds for strcmp 0.23509407043457 seconds for typecasting
Output for 5.5.22
0.29290103912354 seconds for strcmp 0.2326819896698 seconds for typecasting
Output for 5.5.21
0.33944797515869 seconds for strcmp 0.24447202682495 seconds for typecasting
Output for 5.5.20
0.30590105056763 seconds for strcmp 0.2305760383606 seconds for typecasting
Output for 5.5.19
0.29045486450195 seconds for strcmp 0.2345130443573 seconds for typecasting
Output for 5.5.18
0.30227184295654 seconds for strcmp 0.23389887809753 seconds for typecasting
Output for 5.5.16
0.2937068939209 seconds for strcmp 0.2336220741272 seconds for typecasting
Output for 5.5.15
0.28725004196167 seconds for strcmp 0.23600888252258 seconds for typecasting
Output for 5.5.14
0.297208070755 seconds for strcmp 0.23305606842041 seconds for typecasting
Output for 5.5.13
0.28501391410828 seconds for strcmp 0.23282980918884 seconds for typecasting
Output for 5.5.12
0.28191804885864 seconds for strcmp 0.20913887023926 seconds for typecasting
Output for 5.5.11
0.2476589679718 seconds for strcmp 0.20236301422119 seconds for typecasting
Output for 5.5.10
0.26374983787537 seconds for strcmp 0.19279193878174 seconds for typecasting
Output for 5.5.9
0.27721905708313 seconds for strcmp 0.19445300102234 seconds for typecasting
Output for 5.5.8
0.30807185173035 seconds for strcmp 0.25923204421997 seconds for typecasting
Output for 5.5.7
0.29774498939514 seconds for strcmp 0.2337908744812 seconds for typecasting
Output for 5.5.6
0.35875701904297 seconds for strcmp 0.25886583328247 seconds for typecasting
Output for 5.5.5
0.32626795768738 seconds for strcmp 0.2348358631134 seconds for typecasting
Output for 5.5.4
0.3120059967041 seconds for strcmp 0.23794603347778 seconds for typecasting
Output for 5.5.3
0.30158090591431 seconds for strcmp 0.24470281600952 seconds for typecasting
Output for 5.5.2
0.30673003196716 seconds for strcmp 0.23836898803711 seconds for typecasting
Output for 5.5.1
0.29481101036072 seconds for strcmp 0.24212408065796 seconds for typecasting
Output for 5.5.0
0.29927897453308 seconds for strcmp 0.23809289932251 seconds for typecasting
Output for 5.4.45
0.26055693626404 seconds for strcmp 0.21404480934143 seconds for typecasting
Output for 5.4.44
0.2845458984375 seconds for strcmp 0.24017405509949 seconds for typecasting
Output for 5.4.43
0.2639319896698 seconds for strcmp 0.2078959941864 seconds for typecasting
Output for 5.4.42
0.30631303787231 seconds for strcmp 0.2382390499115 seconds for typecasting
Output for 5.4.41
0.2897629737854 seconds for strcmp 0.2374849319458 seconds for typecasting
Output for 5.4.40
0.30931615829468 seconds for strcmp 0.23473906517029 seconds for typecasting
Output for 5.4.39
0.28353190422058 seconds for strcmp 0.24803400039673 seconds for typecasting
Output for 5.4.38
0.34118294715881 seconds for strcmp 0.2814040184021 seconds for typecasting
Output for 5.4.37
0.28846216201782 seconds for strcmp 0.23934102058411 seconds for typecasting
Output for 5.4.36
0.29665803909302 seconds for strcmp 0.23644995689392 seconds for typecasting
Output for 5.4.35
0.29589200019836 seconds for strcmp 0.2382071018219 seconds for typecasting
Output for 5.4.34
0.28047299385071 seconds for strcmp 0.24055504798889 seconds for typecasting
Output for 5.4.32
0.30668711662292 seconds for strcmp 0.25825595855713 seconds for typecasting
Output for 5.4.31
0.30575299263 seconds for strcmp 0.23662209510803 seconds for typecasting
Output for 5.4.30
0.31058812141418 seconds for strcmp 0.23682808876038 seconds for typecasting
Output for 5.4.29
0.34056401252747 seconds for strcmp 0.29056119918823 seconds for typecasting
Output for 5.4.28
0.27434897422791 seconds for strcmp 0.21135210990906 seconds for typecasting
Output for 5.4.27
0.27546715736389 seconds for strcmp 0.19825601577759 seconds for typecasting
Output for 5.4.26
0.2700879573822 seconds for strcmp 0.19579100608826 seconds for typecasting
Output for 5.4.25
0.29558682441711 seconds for strcmp 0.23844885826111 seconds for typecasting
Output for 5.4.24
0.24455404281616 seconds for strcmp 0.21195793151855 seconds for typecasting
Output for 5.4.23
0.31127500534058 seconds for strcmp 0.2370970249176 seconds for typecasting
Output for 5.4.22
0.30582785606384 seconds for strcmp 0.23480200767517 seconds for typecasting
Output for 5.4.21
0.28858304023743 seconds for strcmp 0.23550319671631 seconds for typecasting
Output for 5.4.20
0.3008759021759 seconds for strcmp 0.24289584159851 seconds for typecasting
Output for 5.4.19
0.30673313140869 seconds for strcmp 0.23971199989319 seconds for typecasting
Output for 5.4.18
0.28602981567383 seconds for strcmp 0.24134206771851 seconds for typecasting
Output for 5.4.17
0.28113389015198 seconds for strcmp 0.23786091804504 seconds for typecasting
Output for 5.4.16
0.2915050983429 seconds for strcmp 0.23664307594299 seconds for typecasting
Output for 5.4.15
0.27509498596191 seconds for strcmp 0.23668503761292 seconds for typecasting
Output for 5.4.14
0.28737807273865 seconds for strcmp 0.24036002159119 seconds for typecasting
Output for 5.4.13
0.26877403259277 seconds for strcmp 0.2268660068512 seconds for typecasting
Output for 5.4.12
0.31081604957581 seconds for strcmp 0.23885679244995 seconds for typecasting
Output for 5.4.11
0.33192896842957 seconds for strcmp 0.24960494041443 seconds for typecasting
Output for 5.4.10
0.31090402603149 seconds for strcmp 0.24004197120667 seconds for typecasting
Output for 5.4.9
0.31799793243408 seconds for strcmp 0.23943591117859 seconds for typecasting
Output for 5.4.8
0.28652310371399 seconds for strcmp 0.23950004577637 seconds for typecasting
Output for 5.4.7
0.31777501106262 seconds for strcmp 0.24617385864258 seconds for typecasting
Output for 5.4.6
0.29512214660645 seconds for strcmp 0.23830604553223 seconds for typecasting
Output for 5.4.5
0.2932870388031 seconds for strcmp 0.24088191986084 seconds for typecasting
Output for 5.4.4
0.3058500289917 seconds for strcmp 0.2351438999176 seconds for typecasting
Output for 5.4.3
0.28635096549988 seconds for strcmp 0.22900104522705 seconds for typecasting
Output for 5.4.2
0.28627181053162 seconds for strcmp 0.23821902275085 seconds for typecasting
Output for 5.4.1
0.29727005958557 seconds for strcmp 0.23606419563293 seconds for typecasting
Output for 5.4.0
0.3160080909729 seconds for strcmp 0.23981904983521 seconds for typecasting
Output for 5.3.29
0.32342195510864 seconds for strcmp 0.27363181114197 seconds for typecasting
Output for 5.3.28
0.3513548374176 seconds for strcmp 0.27437114715576 seconds for typecasting
Output for 5.3.27
0.3332850933075 seconds for strcmp 0.27466106414795 seconds for typecasting
Output for 5.3.26
0.34783101081848 seconds for strcmp 0.27494788169861 seconds for typecasting
Output for 5.3.25
0.33152008056641 seconds for strcmp 0.27580118179321 seconds for typecasting
Output for 5.3.24
0.31836009025574 seconds for strcmp 0.27756500244141 seconds for typecasting
Output for 5.3.23
0.36118078231812 seconds for strcmp 0.27626919746399 seconds for typecasting
Output for 5.3.22
0.38670706748962 seconds for strcmp 0.31143188476562 seconds for typecasting
Output for 5.3.21
0.33328795433044 seconds for strcmp 0.28038811683655 seconds for typecasting
Output for 5.3.20
0.34542989730835 seconds for strcmp 0.34030914306641 seconds for typecasting
Output for 5.3.19
0.35083103179932 seconds for strcmp 0.27853202819824 seconds for typecasting
Output for 5.3.18
0.3337869644165 seconds for strcmp 0.27430605888367 seconds for typecasting
Output for 5.3.17
0.32874608039856 seconds for strcmp 0.27757501602173 seconds for typecasting
Output for 5.3.16
0.35045194625854 seconds for strcmp 0.27578401565552 seconds for typecasting
Output for 5.3.15
0.31993007659912 seconds for strcmp 0.2762451171875 seconds for typecasting
Output for 5.3.14
0.31676292419434 seconds for strcmp 0.27671790122986 seconds for typecasting
Output for 5.3.13
0.32650399208069 seconds for strcmp 0.28564310073853 seconds for typecasting
Output for 5.3.12
0.32599997520447 seconds for strcmp 0.27827286720276 seconds for typecasting
Output for 5.3.11
0.32866716384888 seconds for strcmp 0.27940011024475 seconds for typecasting
Output for 5.3.10
0.35436487197876 seconds for strcmp 0.3393120765686 seconds for typecasting
Output for 5.3.9
0.32951498031616 seconds for strcmp 0.27962899208069 seconds for typecasting
Output for 5.3.8
0.32499599456787 seconds for strcmp 0.27672410011292 seconds for typecasting
Output for 5.3.7
0.33175992965698 seconds for strcmp 0.27903199195862 seconds for typecasting
Output for 5.3.6
0.35401797294617 seconds for strcmp 0.27524995803833 seconds for typecasting
Output for 5.3.5
0.35744500160217 seconds for strcmp 0.2741858959198 seconds for typecasting
Output for 5.3.4
0.34769701957703 seconds for strcmp 0.27911996841431 seconds for typecasting
Output for 5.3.3
0.3448691368103 seconds for strcmp 0.27710199356079 seconds for typecasting
Output for 5.3.2
0.33182501792908 seconds for strcmp 0.27707386016846 seconds for typecasting
Output for 5.3.1
0.34480309486389 seconds for strcmp 0.27767086029053 seconds for typecasting
Output for 5.3.0
0.35246610641479 seconds for strcmp 0.2768349647522 seconds for typecasting
Output for 5.2.17
0.42139601707458 seconds for strcmp 0.37185192108154 seconds for typecasting
Output for 5.2.16
0.39096593856812 seconds for strcmp 0.36733293533325 seconds for typecasting
Output for 5.2.15
0.41388201713562 seconds for strcmp 0.36847281455994 seconds for typecasting
Output for 5.2.14
0.3825888633728 seconds for strcmp 0.36328387260437 seconds for typecasting
Output for 5.2.13
0.37451601028442 seconds for strcmp 0.34438419342041 seconds for typecasting
Output for 5.2.12
0.3797709941864 seconds for strcmp 0.35290312767029 seconds for typecasting
Output for 5.2.11
0.40081095695496 seconds for strcmp 0.35983180999756 seconds for typecasting
Output for 5.2.10
0.39802002906799 seconds for strcmp 0.36312580108643 seconds for typecasting
Output for 5.2.9
0.36923694610596 seconds for strcmp 0.32619404792786 seconds for typecasting
Output for 5.2.8
0.37844586372375 seconds for strcmp 0.29831194877625 seconds for typecasting
Output for 5.2.7
0.35052609443665 seconds for strcmp 0.31866407394409 seconds for typecasting
Output for 5.2.6
0.38044095039368 seconds for strcmp 0.36642289161682 seconds for typecasting
Output for 5.2.5
0.39194917678833 seconds for strcmp 0.36863780021667 seconds for typecasting
Output for 5.2.4
0.32013392448425 seconds for strcmp 0.30541110038757 seconds for typecasting
Output for 5.2.3
0.36493706703186 seconds for strcmp 0.30077004432678 seconds for typecasting
Output for 5.2.2
0.40024518966675 seconds for strcmp 0.36389803886414 seconds for typecasting
Output for 5.2.1
0.4399778842926 seconds for strcmp 0.40331196784973 seconds for typecasting
Output for 5.2.0
0.4857771396637 seconds for strcmp 0.4849259853363 seconds for typecasting
Output for 5.1.6
0.44764685630798 seconds for strcmp 0.46033692359924 seconds for typecasting
Output for 5.1.5
0.45543885231018 seconds for strcmp 0.43234610557556 seconds for typecasting
Output for 5.1.4
0.45265913009644 seconds for strcmp 0.43400716781616 seconds for typecasting
Output for 5.1.3
0.50110793113708 seconds for strcmp 0.45554709434509 seconds for typecasting
Output for 5.1.2
0.43865990638733 seconds for strcmp 0.34651112556458 seconds for typecasting
Output for 5.1.1
0.43953585624695 seconds for strcmp 0.41422605514526 seconds for typecasting
Output for 5.1.0
0.42326378822327 seconds for strcmp 0.34179902076721 seconds for typecasting
Output for 5.0.5
0.62969493865967 seconds for strcmp 0.52262592315674 seconds for typecasting
Output for 5.0.4
0.60728406906128 seconds for strcmp 0.489590883255 seconds for typecasting
Output for 5.0.3
0.58572196960449 seconds for strcmp 0.48759698867798 seconds for typecasting
Output for 5.0.2
0.60336589813232 seconds for strcmp 0.5389358997345 seconds for typecasting
Output for 5.0.1
0.59593605995178 seconds for strcmp 0.51600503921509 seconds for typecasting
Output for 5.0.0
0.70712304115295 seconds for strcmp 0.60740399360657 seconds for typecasting
Output for 4.4.9
0.571144 seconds for strcmp -0.441578 seconds for typecasting
Output for 4.4.8
0.590314 seconds for strcmp -0.501429 seconds for typecasting
Output for 4.4.7
0.566885 seconds for strcmp -0.528501 seconds for typecasting
Output for 4.4.6
0.649003 seconds for strcmp -0.462826 seconds for typecasting
Output for 4.4.5
0.632541 seconds for strcmp -0.491846 seconds for typecasting
Output for 4.4.4
0.523951 seconds for strcmp -0.468953 seconds for typecasting
Output for 4.4.3
0.564562 seconds for strcmp -0.481966 seconds for typecasting
Output for 4.4.2
0.671377 seconds for strcmp -0.474382 seconds for typecasting
Output for 4.4.1
0.696507 seconds for strcmp -0.467095 seconds for typecasting
Output for 4.4.0
0.573184 seconds for strcmp -0.507358 seconds for typecasting
Output for 4.3.11
0.544511 seconds for strcmp -0.532046 seconds for typecasting
Output for 4.3.10
0.610924 seconds for strcmp -0.485433 seconds for typecasting
Output for 4.3.9
0.608942 seconds for strcmp -0.485782 seconds for typecasting
Output for 4.3.8
0.621069 seconds for strcmp -0.497873 seconds for typecasting
Output for 4.3.7
0.623506 seconds for strcmp -0.460359 seconds for typecasting
Output for 4.3.6
0.640678 seconds for strcmp -0.419637 seconds for typecasting
Output for 4.3.5
0.610762 seconds for strcmp -0.492182 seconds for typecasting
Output for 4.3.4
0.496076 seconds for strcmp 0.473617 seconds for typecasting
Output for 4.3.3
0.590837 seconds for strcmp -0.482024 seconds for typecasting
Output for 4.3.2
0.516938 seconds for strcmp -0.499488 seconds for typecasting
Output for 4.3.1
0.615755 seconds for strcmp -0.446101 seconds for typecasting
Output for 4.3.0
0.618258 seconds for strcmp -0.448941 seconds for typecasting