3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php for ($i=0; $i<1000; $i++) { echo gmp_nextprime($i*3); }
based on Efc7k
Output for 5.6.8 - 5.6.20, 5.6.28 - 7.0.5, 7.0.20 - 7.2.0
2571113171923292931373741434753535959616767717379798389899797971011031071091131271271271271271311371371391491491491511571571631631671731731791791811911911911931971992112112112112232232232232272292332392392412512512512572572632632692692712772772812832932932933073073073073073113133173313313313313313373373473473473493533593593673673673733733793793833893893973973974014094094094194194194214314314314334394394434494494574574574614634674794794794794874874874914994994995035095095215215215215235415415415415415415475475575575575635635695695715775775875875875935935995996016076076136136176196316316316316416416416436476536536596596616736736736736776836836916916917017017017097097097197197197277277277337337397397437517517517577577617697697697737877877877877877977977978098098098098118218218218238278298398398398538538538538538578598638778778778778778818838879079079079079079079079119199199199299299299379379379419479479539539679679679679679719779779839839919919919979971009100910091009101310191019102110311031103110331039103910491049104910511061106110611063106910691087108710871087108710871091109310971103110311091109111711171117112311231129112911511151115111511151115111511153116311631163117111711171118111811181118711871193119312011201120112131213121312131217122312231229122912311237123712491249124912491259125912591277127712771277127712771279128312891289129112971297130113031307131913191319131913211327132713611361136113611361136113611361136113611361136713671373137313811381138113991399139913991399139914091409140914231423142314231423142714291433143914391447144714471451145314591459147114711471147114811481148114831487148914931499149915111511151115111523152315231523153115311531154315431543154315491549155315591559156715671567157115791579157915831597159715971597159716011607160716091613161916191621162716271637163716371657165716571657165716571657166316631667166916931693169316931693169316931693169716991709170917091721172117211721172317331733173317411741174117471747175317531759175917771777177717771777177717831783178717891801180118011801181118111811182318231823182318311831183118471847184718471847186118611861186118611867186718711873187718791889188918891901190119011901190719071913191319311931193119311931193119331949194919491949194919511973197319731973197319731973197919791987198719871993199319971999200320112011201120172017202720272027202920392039203920532053205320532053206320632063206920692081208120812081208320872089209920992099211121112111211121132129212921292129212921312137213721412143215321532153216121612161217921792179217921792179220322032203220322032203220322032207221322132221222122212237223722372237223722392243225122512251226722672267226722672269227322812281228122872287229322932297230923092309230923112333233323332333233323332333233923392341234723472351235723572371237123712371237123772377238123832389238923932399239924112411241124112417241724232423243724372437243724372441244724472459245924592459246724672467247324732477250325032503250325032503250325032503252125212521252125212521253125312531253925392539254325492549255125572557257925792579257925792579257925912591259125912593260926092609260926092617261726172621263326332633263326472647264726472647265726572657265926632671267126712677267726832683268726892693269926992707270727072711271327192719272927292729273127412741274127492749274927532767276727672767276727772777277727892789278927892791279727972801280328192819281928192819283328332833283328332837284328432851285128512857285728612879287928792879287928792887288728872897289728972903290329092909291729172917292729272927293929392939293929532953295329532953295729632963296929692971299929992999299929992999299929992999
Output for 7.0.6
Fatal error: Uncaught Error: Call to undefined function gmp_nextprime() in /in/laTXA:4 Stack trace: #0 {main} thrown in /in/laTXA on line 4
Process exited with code 255.
Output for 5.3.21 - 5.3.29, 5.5.35, 5.6.21
Fatal error: Call to undefined function gmp_nextprime() in /in/laTXA on line 4
Process exited with code 255.
Output for 5.4.11 - 5.5.34
Resource id #5Resource id #7Resource id #9Resource id #11Resource id #13Resource id #15Resource id #17Resource id #19Resource id #21Resource id #23Resource id #25Resource id #27Resource id #29Resource id #31Resource id #33Resource id #35Resource id #37Resource id #39Resource id #41Resource id #43Resource id #45Resource id #47Resource id #49Resource id #51Resource id #53Resource id #55Resource id #57Resource id #59Resource id #61Resource id #63Resource id #65Resource id #67Resource id #69Resource id #71Resource id #73Resource id #75Resource id #77Resource id #79Resource id #81Resource id #83Resource id #85Resource id #87Resource id #89Resource id #91Resource id #93Resource id #95Resource id #97Resource id #99Resource id #101Resource id #103Resource id #105Resource id #107Resource id #109Resource id #111Resource id #113Resource id #115Resource id #117Resource id #119Resource id #121Resource id #123Resource id #125Resource id #127Resource id #129Resource id #131Resource id #133Resource id #135Resource id #137Resource id #139Resource id #141Resource id #143Resource id #145Resource id #147Resource id #149Resource id #151Resource id #153Resource id #155Resource id #157Resource id #159Resource id #161Resource id #163Resource id #165Resource id #167Resource id #169Resource id #171Resource id #173Resource id #175Resource id #177Resource id #179Resource id #181Resource id #183Resource id #185Resource id #187Resource id #189Resource id #191Resource id #193Resource id #195Resource id #197Resource id #199Resource id #201Resource id #203Resource id #205Resource id #207Resource id #209Resource id #211Resource id #213Resource id #215Resource id #217Resource id #219Resource id #221Resource id #223Resource id #225Resource id #227Resource id #229Resource id #231Resource id #233Resource id #235Resource id #237Resource id #239Resource id #241Resource id #243Resource id #245Resource id #247Resource id #249Resource id #251Resource id #253Resource id #255Resource id #257Resource id #259Resource id #261Resource id #263Resource id #265Resource id #267Resource id #269Resource id #271Resource id #273Resource id #275Resource id #277Resource id #279Resource id #281Resource id #283Resource id #285Resource id #287Resource id #289Resource id #291Resource id #293Resource id #295Resource id #297Resource id #299Resource id #301Resource id #303Resource id #305Resource id #307Resource id #309Resource id #311Resource id #313Resource id #315Resource id #317Resource id #319Resource id #321Resource id #323Resource id #325Resource id #327Resource id #329Resource id #331Resource id #333Resource id #335Resource id #337Resource id #339Resource id #341Resource id #343Resource id #345Resource id #347Resource id #349Resource id #351Resource id #353Resource id #355Resource id #357Resource id #359Resource id #361Resource id #363Resource id #365Resource id #367Resource id #369Resource id #371Resource id #373Resource id #375Resource id #377Resource id #379Resource id #381Resource id #383Resource id #385Resource id #387Resource id #389Resource id #391Resource id #393Resource id #395Resource id #397Resource id #399Resource id #401Resource id #403Resource id #405Resource id #407Resource id #409Resource id #411Resource id #413Resource id #415Resource id #417Resource id #419Resource id #421Resource id #423Resource id #425Resource id #427Resource id #429Resource id #431Resource id #433Resource id #435Resource id #437Resource id #439Resource id #441Resource id #443Resource id #445Resource id #447Resource id #449Resource id #451Resource id #453Resource id #455Resource id #457Resource id #459Resource id #461Resource id #463Resource id #465Resource id #467Resource id #469Resource id #471Resource id #473Resource id #475Resource id #477Resource id #479Resource id #481Resource id #483Resource id #485Resource id #487Resource id #489Resource id #491Resource id #493Resource id #495Resource id #497Resource id #499Resource id #501Resource id #503Resource id #505Resource id #507Resource id #509Resource id #511Resource id #513Resource id #515Resource id #517Resource id #519Resource id #521Resource id #523Resource id #525Resource id #527Resource id #529Resource id #531Resource id #533Resource id #535Resource id #537Resource id #539Resource id #541Resource id #543Resource id #545Resource id #547Resource id #549Resource id #551Resource id #553Resource id #555Resource id #557Resource id #559Resource id #561Resource id #563Resource id #565Resource id #567Resource id #569Resource id #571Resource id #573Resource id #575Resource id #577Resource id #579Resource id #581Resource id #583Resource id #585Resource id #587Resource id #589Resource id #591Resource id #593Resource id #595Resource id #597Resource id #599Resource id #601Resource id #603Resource id #605Resource id #607Resource id #609Resource id #611Resource id #613Resource id #615Resource id #617Resource id #619Resource id #621Resource id #623Resource id #625Resource id #627Resource id #629Resource id #631Resource id #633Resource id #635Resource id #637Resource id #639Resource id #641Resource id #643Resource id #645Resource id #647Resource id #649Resource id #651Resource id #653Resource id #655Resource id #657Resource id #659Resource id #661Resource id #663Resource id #665Resource id #667Resource id #669Resource id #671Resource id #673Resource id #675Resource id #677Resource id #679Resource id #681Resource id #683Resource id #685Resource id #687Resource id #689Resource id #691Resource id #693Resource id #695Resource id #697Resource id #699Resource id #701Resource id #703Resource id #705Resource id #707Resource id #709Resource id #711Resource id #713Resource id #715Resource id #717Resource id #719Resource id #721Resource id #723Resource id #725Resource id #727Resource id #729Resource id #731Resource id #733Resource id #735Resource id #737Resource id #739Resource id #741Resource id #743Resource id #745Resource id #747Resource id #749Resource id #751Resource id #753Resource id #755Resource id #757Resource id #759Resource id #761Resource id #763Resource id #765Resource id #767Resource id #769Resource id #771Resource id #773Resource id #775Resource id #777Resource id #779Resource id #781Resource id #783Resource id #785Resource id #787Resource id #789Resource id #791Resource id #793Resource id #795Resource id #797Resource id #799Resource id #801Resource id #803Resource id #805Resource id #807Resource id #809Resource id #811Resource id #813Resource id #815Resource id #817Resource id #819Resource id #821Resource id #823Resource id #825Resource id #827Resource id #829Resource id #831Resource id #833Resource id #835Resource id #837Resource id #839Resource id #841Resource id #843Resource id #845Resource id #847Resource id #849Resource id #851Resource id #853Resource id #855Resource id #857Resource id #859Resource id #861Resource id #863Resource id #865Resource id #867Resource id #869Resource id #871Resource id #873Resource id #875Resource id #877Resource id #879Resource id #881Resource id #883Resource id #885Resource id #887Resource id #889Resource id #891Resource id #893Resource id #895Resource id #897Resource id #899Resource id #901Resource id #903Resource id #905Resource id #907Resource id #909Resource id #911Resource id #913Resource id #915Resource id #917Resource id #919Resource id #921Resource id #923Resource id #925Resource id #927Resource id #929Resource id #931Resource id #933Resource id #935Resource id #937Resource id #939Resource id #941Resource id #943Resource id #945Resource id #947Resource id #949Resource id #951Resource id #953Resource id #955Resource id #957Resource id #959Resource id #961Resource id #963Resource id #965Resource id #967Resource id #969Resource id #971Resource id #973Resource id #975Resource id #977Resource id #979Resource id #981Resource id #983Resource id #985Resource id #987Resource id #989Resource id #991Resource id #993Resource id #995Resource id #997Resource id #999Resource id #1001Resource id #1003Resource id #1005Resource id #1007Resource id #1009Resource id #1011Resource id #1013Resource id #1015Resource id #1017Resource id #1019Resource id #1021Resource id #1023Resource id #1025Resource id #1027Resource id #1029Resource id #1031Resource id #1033Resource id #1035Resource id #1037Resource id #1039Resource id #1041Resource id #1043Resource id #1045Resource id #1047Resource id #1049Resource id #1051Resource id #1053Resource id #1055Resource id #1057Resource id #1059Resource id #1061Resource id #1063Resource id #1065Resource id #1067Resource id #1069Resource id #1071Resource id #1073Resource id #1075Resource id #1077Resource id #1079Resource id #1081Resource id #1083Resource id #1085Resource id #1087Resource id #1089Resource id #1091Resource id #1093Resource id #1095Resource id #1097Resource id #1099Resource id #1101Resource id #1103Resource id #1105Resource id #1107Resource id #1109Resource id #1111Resource id #1113Resource id #1115Resource id #1117Resource id #1119Resource id #1121Resource id #1123Resource id #1125Resource id #1127Resource id #1129Resource id #1131Resource id #1133Resource id #1135Resource id #1137Resource id #1139Resource id #1141Resource id #1143Resource id #1145Resource id #1147Resource id #1149Resource id #1151Resource id #1153Resource id #1155Resource id #1157Resource id #1159Resource id #1161Resource id #1163Resource id #1165Resource id #1167Resource id #1169Resource id #1171Resource id #1173Resource id #1175Resource id #1177Resource id #1179Resource id #1181Resource id #1183Resource id #1185Resource id #1187Resource id #1189Resource id #1191Resource id #1193Resource id #1195Resource id #1197Resource id #1199Resource id #1201Resource id #1203Resource id #1205Resource id #1207Resource id #1209Resource id #1211Resource id #1213Resource id #1215Resource id #1217Resource id #1219Resource id #1221Resource id #1223Resource id #1225Resource id #1227Resource id #1229Resource id #1231Resource id #1233Resource id #1235Resource id #1237Resource id #1239Resource id #1241Resource id #1243Resource id #1245Resource id #1247Resource id #1249Resource id #1251Resource id #1253Resource id #1255Resource id #1257Resource id #1259Resource id #1261Resource id #1263Resource id #1265Resource id #1267Resource id #1269Resource id #1271Resource id #1273Resource id #1275Resource id #1277Resource id #1279Resource id #1281Resource id #1283Resource id #1285Resource id #1287Resource id #1289Resource id #1291Resource id #1293Resource id #1295Resource id #1297Resource id #1299Resource id #1301Resource id #1303Resource id #1305Resource id #1307Resource id #1309Resource id #1311Resource id #1313Resource id #1315Resource id #1317Resource id #1319Resource id #1321Resource id #1323Resource id #1325Resource id #1327Resource id #1329Resource id #1331Resource id #1333Resource id #1335Resource id #1337Resource id #1339Resource id #1341Resource id #1343Resource id #1345Resource id #1347Resource id #1349Resource id #1351Resource id #1353Resource id #1355Resource id #1357Resource id #1359Resource id #1361Resource id #1363Resource id #1365Resource id #1367Resource id #1369Resource id #1371Resource id #1373Resource id #1375Resource id #1377Resource id #1379Resource id #1381Resource id #1383Resource id #1385Resource id #1387Resource id #1389Resource id #1391Resource id #1393Resource id #1395Resource id #1397Resource id #1399Resource id #1401Resource id #1403Resource id #1405Resource id #1407Resource id #1409Resource id #1411Resource id #1413Resource id #1415Resource id #1417Resource id #1419Resource id #1421Resource id #1423Resource id #1425Resource id #1427Resource id #1429Resource id #1431Resource id #1433Resource id #1435Resource id #1437Resource id #1439Resource id #1441Resource id #1443Resource id #1445Resource id #1447Resource id #1449Resource id #1451Resource id #1453Resource id #1455Resource id #1457Resource id #1459Resource id #1461Resource id #1463Resource id #1465Resource id #1467Resource id #1469Resource id #1471Resource id #1473Resource id #1475Resource id #1477Resource id #1479Resource id #1481Resource id #1483Resource id #1485Resource id #1487Resource id #1489Resource id #1491Resource id #1493Resource id #1495Resource id #1497Resource id #1499Resource id #1501Resource id #1503Resource id #1505Resource id #1507Resource id #1509Resource id #1511Resource id #1513Resource id #1515Resource id #1517Resource id #1519Resource id #1521Resource id #1523Resource id #1525Resource id #1527Resource id #1529Resource id #1531Resource id #1533Resource id #1535Resource id #1537Resource id #1539Resource id #1541Resource id #1543Resource id #1545Resource id #1547Resource id #1549Resource id #1551Resource id #1553Resource id #1555Resource id #1557Resource id #1559Resource id #1561Resource id #1563Resource id #1565Resource id #1567Resource id #1569Resource id #1571Resource id #1573Resource id #1575Resource id #1577Resource id #1579Resource id #1581Resource id #1583Resource id #1585Resource id #1587Resource id #1589Resource id #1591Resource id #1593Resource id #1595Resource id #1597Resource id #1599Resource id #1601Resource id #1603Resource id #1605Resource id #1607Resource id #1609Resource id #1611Resource id #1613Resource id #1615Resource id #1617Resource id #1619Resource id #1621Resource id #1623Resource id #1625Resource id #1627Resource id #1629Resource id #1631Resource id #1633Resource id #1635Resource id #1637Resource id #1639Resource id #1641Resource id #1643Resource id #1645Resource id #1647Resource id #1649Resource id #1651Resource id #1653Resource id #1655Resource id #1657Resource id #1659Resource id #1661Resource id #1663Resource id #1665Resource id #1667Resource id #1669Resource id #1671Resource id #1673Resource id #1675Resource id #1677Resource id #1679Resource id #1681Resource id #1683Resource id #1685Resource id #1687Resource id #1689Resource id #1691Resource id #1693Resource id #1695Resource id #1697Resource id #1699Resource id #1701Resource id #1703Resource id #1705Resource id #1707Resource id #1709Resource id #1711Resource id #1713Resource id #1715Resource id #1717Resource id #1719Resource id #1721Resource id #1723Resource id #1725Resource id #1727Resource id #1729Resource id #1731Resource id #1733Resource id #1735Resource id #1737Resource id #1739Resource id #1741Resource id #1743Resource id #1745Resource id #1747Resource id #1749Resource id #1751Resource id #1753Resource id #1755Resource id #1757Resource id #1759Resource id #1761Resource id #1763Resource id #1765Resource id #1767Resource id #1769Resource id #1771Resource id #1773Resource id #1775Resource id #1777Resource id #1779Resource id #1781Resource id #1783Resource id #1785Resource id #1787Resource id #1789Resource id #1791Resource id #1793Resource id #1795Resource id #1797Resource id #1799Resource id #1801Resource id #1803Resource id #1805Resource id #1807Resource id #1809Resource id #1811Resource id #1813Resource id #1815Resource id #1817Resource id #1819Resource id #1821Resource id #1823Resource id #1825Resource id #1827Resource id #1829Resource id #1831Resource id #1833Resource id #1835Resource id #1837Resource id #1839Resource id #1841Resource id #1843Resource id #1845Resource id #1847Resource id #1849Resource id #1851Resource id #1853Resource id #1855Resource id #1857Resource id #1859Resource id #1861Resource id #1863Resource id #1865Resource id #1867Resource id #1869Resource id #1871Resource id #1873Resource id #1875Resource id #1877Resource id #1879Resource id #1881Resource id #1883Resource id #1885Resource id #1887Resource id #1889Resource id #1891Resource id #1893Resource id #1895Resource id #1897Resource id #1899Resource id #1901Resource id #1903Resource id #1905Resource id #1907Resource id #1909Resource id #1911Resource id #1913Resource id #1915Resource id #1917Resource id #1919Resource id #1921Resource id #1923Resource id #1925Resource id #1927Resource id #1929Resource id #1931Resource id #1933Resource id #1935Resource id #1937Resource id #1939Resource id #1941Resource id #1943Resource id #1945Resource id #1947Resource id #1949Resource id #1951Resource id #1953Resource id #1955Resource id #1957Resource id #1959Resource id #1961Resource id #1963Resource id #1965Resource id #1967Resource id #1969Resource id #1971Resource id #1973Resource id #1975Resource id #1977Resource id #1979Resource id #1981Resource id #1983Resource id #1985Resource id #1987Resource id #1989Resource id #1991Resource id #1993Resource id #1995Resource id #1997Resource id #1999Resource id #2001Resource id #2003