3v4l.org

run code in 300+ PHP versions simultaneously
<?php function genRandomString() { $length = 10; $characters = "0123456789abcdefghijklmnopqrstuvwxyz"; $string = ""; for ($p = 0; $p < $length; $p++) { $string .= $characters[mt_rand(0, strlen($characters)-1)]; } return $string; } function makeRandomPath($dir, $ext) { do { $path = $dir."/".genRandomString().".".$ext; } while(file_exists($path)); return $path; } function makeRandomPathFromFilename($dir, $fn) { $ext = pathinfo($fn, PATHINFO_EXTENSION); echo $ext; return makeRandomPath($dir, $ext); } $target_path = makeRandomPathFromFilename("upload", "test.php./../../../../../../../etc/passwd"); echo $target_path; ?>
Output for 7.4.0
Warning: file_exists(): open_basedir restriction in effect. File(upload/ip7iwiydlu.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/ip7iwiydlu.
Output for 7.3.12
Warning: file_exists(): open_basedir restriction in effect. File(upload/b0o1zz285m.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/b0o1zz285m.
Output for 7.3.11
Warning: file_exists(): open_basedir restriction in effect. File(upload/ac1kb4wbjl.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/ac1kb4wbjl.
Output for 7.3.10
Warning: file_exists(): open_basedir restriction in effect. File(upload/5bbikvy1jq.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/5bbikvy1jq.
Output for 7.3.9
Warning: file_exists(): open_basedir restriction in effect. File(upload/9fen1s1ax6.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/9fen1s1ax6.
Output for 7.3.8
Warning: file_exists(): open_basedir restriction in effect. File(upload/7oxptcck7x.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/7oxptcck7x.
Output for 7.3.7
Warning: file_exists(): open_basedir restriction in effect. File(upload/yvft0u3tpc.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/yvft0u3tpc.
Output for 7.3.6
Warning: file_exists(): open_basedir restriction in effect. File(upload/gcw49fchyf.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/gcw49fchyf.
Output for 7.3.5
Warning: file_exists(): open_basedir restriction in effect. File(upload/s0x1d9j0zp.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/s0x1d9j0zp.
Output for 7.3.4
Warning: file_exists(): open_basedir restriction in effect. File(upload/ht56j8lfk1.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/ht56j8lfk1.
Output for 7.3.3
Warning: file_exists(): open_basedir restriction in effect. File(upload/6irq00rkyg.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/6irq00rkyg.
Output for 7.3.2
Warning: file_exists(): open_basedir restriction in effect. File(upload/y8hxy29xwa.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/y8hxy29xwa.
Output for 7.3.1
Warning: file_exists(): open_basedir restriction in effect. File(upload/pmveybjt3g.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/pmveybjt3g.
Output for 7.3.0
Warning: file_exists(): open_basedir restriction in effect. File(upload/xi98w7d17k.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/xi98w7d17k.
Output for 7.2.25
Warning: file_exists(): open_basedir restriction in effect. File(upload/hl1tni2l3x.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/hl1tni2l3x.
Output for 7.2.24
Warning: file_exists(): open_basedir restriction in effect. File(upload/8at3g4u4pm.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/8at3g4u4pm.
Output for 7.2.23
Warning: file_exists(): open_basedir restriction in effect. File(upload/vl3u4vq7wc.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/vl3u4vq7wc.
Output for 7.2.22
Warning: file_exists(): open_basedir restriction in effect. File(upload/dvbcybppej.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/dvbcybppej.
Output for 7.2.21
Warning: file_exists(): open_basedir restriction in effect. File(upload/xa3krebpr4.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/xa3krebpr4.
Output for 7.2.20
Warning: file_exists(): open_basedir restriction in effect. File(upload/wnu5x09cga.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/wnu5x09cga.
Output for 7.2.19
Warning: file_exists(): open_basedir restriction in effect. File(upload/h2pkvhyx48.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/h2pkvhyx48.
Output for 7.2.18
Warning: file_exists(): open_basedir restriction in effect. File(upload/h6okuvvt2m.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/h6okuvvt2m.
Output for 7.2.17
Warning: file_exists(): open_basedir restriction in effect. File(upload/c653pzq6k6.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/c653pzq6k6.
Output for 7.2.16
Warning: file_exists(): open_basedir restriction in effect. File(upload/yvg0suut1l.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/yvg0suut1l.
Output for 7.2.15
Warning: file_exists(): open_basedir restriction in effect. File(upload/yijb6b9drr.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/yijb6b9drr.
Output for 7.2.14
Warning: file_exists(): open_basedir restriction in effect. File(upload/6ciq14rwcn.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/6ciq14rwcn.
Output for 7.2.13
Warning: file_exists(): open_basedir restriction in effect. File(upload/f34r0tuv5o.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/f34r0tuv5o.
Output for 7.2.12
Warning: file_exists(): open_basedir restriction in effect. File(upload/akwpnct3gf.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/akwpnct3gf.
Output for 7.2.11
Warning: file_exists(): open_basedir restriction in effect. File(upload/9uxsfshoxq.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/9uxsfshoxq.
Output for 7.2.10
Warning: file_exists(): open_basedir restriction in effect. File(upload/2mcousltue.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/2mcousltue.
Output for 7.2.9
Warning: file_exists(): open_basedir restriction in effect. File(upload/qqpmmepa7f.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/qqpmmepa7f.
Output for 7.2.8
Warning: file_exists(): open_basedir restriction in effect. File(upload/h86zq1y7r5.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/h86zq1y7r5.
Output for 7.2.7
Warning: file_exists(): open_basedir restriction in effect. File(upload/p2k0a622bt.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/p2k0a622bt.
Output for 7.2.6
Warning: file_exists(): open_basedir restriction in effect. File(upload/3fa0a5ghfz.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/3fa0a5ghfz.
Output for 7.2.5
Warning: file_exists(): open_basedir restriction in effect. File(upload/lfgb9btu1h.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/lfgb9btu1h.
Output for 7.2.4
Warning: file_exists(): open_basedir restriction in effect. File(upload/plro63xp9q.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/plro63xp9q.
Output for 7.2.3
Warning: file_exists(): open_basedir restriction in effect. File(upload/jow57kkz6j.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/jow57kkz6j.
Output for 7.2.2
Warning: file_exists(): open_basedir restriction in effect. File(upload/1g0mciyg99.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/1g0mciyg99.
Output for 7.2.1
Warning: file_exists(): open_basedir restriction in effect. File(upload/haajo8ts1t.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/haajo8ts1t.
Output for 7.2.0
Warning: file_exists(): open_basedir restriction in effect. File(upload/cos6y2kf0v.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/cos6y2kf0v.
Output for 7.1.33
Warning: file_exists(): open_basedir restriction in effect. File(upload/6uxoif0fgm.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/6uxoif0fgm.
Output for 7.1.32
Warning: file_exists(): open_basedir restriction in effect. File(upload/3dzq53titp.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/3dzq53titp.
Output for 7.1.31
Warning: file_exists(): open_basedir restriction in effect. File(upload/2vby2mc5l1.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/2vby2mc5l1.
Output for 7.1.30
Warning: file_exists(): open_basedir restriction in effect. File(upload/su74k8natn.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/su74k8natn.
Output for 7.1.29
Warning: file_exists(): open_basedir restriction in effect. File(upload/tnsqwfnox8.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/tnsqwfnox8.
Output for 7.1.28
Warning: file_exists(): open_basedir restriction in effect. File(upload/cprkrlcsvt.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/cprkrlcsvt.
Output for 7.1.27
Warning: file_exists(): open_basedir restriction in effect. File(upload/pn5pvewymp.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/pn5pvewymp.
Output for 7.1.26
Warning: file_exists(): open_basedir restriction in effect. File(upload/djfnjawkp7.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/djfnjawkp7.
Output for 7.1.25
Warning: file_exists(): open_basedir restriction in effect. File(upload/uz80erdj94.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2tmU6 on line 17 upload/uz80erdj94.
Output for 7.1.7
upload/xyxj24lken.
Output for 7.1.6
upload/fe60ncy2e9.
Output for 7.1.5
upload/u2q5wlw4gx.
Output for 7.1.0
upload/6wfw5m1sar.
Output for 7.0.20
upload/uu9b6b3lth.
Output for 7.0.14
upload/6lkq1ml1hx.
Output for 7.0.12
upload/9iinq620q1.
Output for 7.0.6
upload/3lqk0vdpgt.
Output for 7.0.5
upload/e5zv4ifjuq.
Output for 7.0.4
upload/1y4qlz5vnj.
Output for 7.0.3
upload/dnrfdiidar.
Output for 7.0.2
upload/gjcu4m49nl.
Output for 7.0.1
upload/60ibmk9qgm.
Output for 7.0.0
upload/fpqp6lpks5.
Output for 5.6.28
upload/mw18co5rem.
Output for 5.6.21
upload/we8vaq7osp.
Output for 5.6.20
upload/vvopfvyjdx.
Output for 5.6.19
upload/l4znn8w4zl.
Output for 5.6.18
upload/ct1e0s735m.
Output for 5.6.17
upload/h8897pcavq.
Output for 5.6.16
upload/0jjlhubijz.
Output for 5.6.15
upload/b4n5aq98rp.
Output for 5.6.14
upload/zzj3dfxcqq.
Output for 5.6.13
upload/jhu053oe23.
Output for 5.6.12
upload/6f7fsfmp6r.
Output for 5.6.11
upload/7js76yjdf0.
Output for 5.6.10
upload/fttuct481u.
Output for 5.6.9
upload/03nfvapil5.
Output for 5.6.8
upload/6n0w28hlcy.
Output for 5.6.7
upload/temu7s0w1q.
Output for 5.5.35
upload/ilakm6f5sw.
Output for 5.5.34
upload/ri0swgpy59.
Output for 5.5.33
upload/u71yximlu7.
Output for 5.5.32
upload/407bie3q7f.
Output for 5.5.31
upload/txm6guqb6t.
Output for 5.5.30
upload/mr9qrctorq.
Output for 5.5.29
upload/y78kxcdgyb.
Output for 5.5.28
upload/hmteiyqukr.
Output for 5.5.27
upload/29qjlzuniw.
Output for 5.5.26
upload/gknofpdayl.
Output for 5.5.25
upload/z9eskcv0wa.
Output for 5.5.24
upload/rs8mz304pv.
Output for 5.4.45
upload/p26ynfdxpo.
Output for 5.4.44
upload/khpwmhi1og.
Output for 5.4.43
upload/hkhdp9zg2z.
Output for 5.4.42
upload/wo9v4xxftu.
Output for 5.4.41
upload/9qkkbezmdy.
Output for 5.4.40
upload/ewyqlue8za.
Output for 5.4.39
upload/xifpn5dn9i.
Output for 5.4.38
upload/nidper8tdq.
Output for 5.4.37
upload/njg9r7auuu.
Output for 5.4.36
upload/wclzoj8b8w.
Output for 5.4.35
upload/e99jrcobs1.
Output for 5.4.34
upload/yuuwxlut1m.
Output for 5.4.32
upload/eqwamgdmoi.
Output for 5.4.31
upload/px448pqhqg.
Output for 5.4.30
upload/3s2gs9ivog.
Output for 5.4.29
upload/7l0pz64ml2.
Output for 5.4.28
upload/qe9yeztau9.
Output for 5.4.27
upload/dtstj933n2.
Output for 5.4.26
upload/kbml8bexg3.
Output for 5.4.25
upload/do9ow2oco3.
Output for 5.4.24
upload/gx5q0mzbug.
Output for 5.4.23
upload/r5buc2w40i.
Output for 5.4.22
upload/c8ltqix16w.
Output for 5.4.21
upload/ly7wwcceha.
Output for 5.4.20
upload/eihoh8huh2.
Output for 5.4.19
upload/gybsb12epb.
Output for 5.4.18
upload/8zh9ijghmy.
Output for 5.4.17
upload/y2bfmj8b3c.
Output for 5.4.16
upload/2uq7ounqmv.
Output for 5.4.15
upload/h6inyx47r5.
Output for 5.4.14
upload/vpwspe6wg5.
Output for 5.4.13
upload/mcu6eotb57.
Output for 5.4.12
upload/k3wre22vh1.
Output for 5.4.11
upload/px6hk79m0t.
Output for 5.4.10
upload/ua9rtssjuc.
Output for 5.4.9
upload/hs7g8jxrg5.
Output for 5.4.8
upload/ii3qv3x5rd.
Output for 5.4.7
upload/4kb033yao9.
Output for 5.4.6
upload/ne9d3kvujj.
Output for 5.4.5
upload/hvrvx1iba1.
Output for 5.4.4
upload/e7m5qf4xdt.
Output for 5.4.3
upload/mdmg89tkjw.
Output for 5.4.2
upload/obnd7pfuco.
Output for 5.4.1
upload/frag96hy2x.
Output for 5.4.0
upload/56av181egf.
Output for 5.3.29
upload/jy7xhxtezb.
Output for 5.3.28
upload/8lqsj4iidx.
Output for 5.3.27
upload/43yucooy41.
Output for 5.3.26
upload/uhtu8jqx03.
Output for 5.3.25
upload/kedlljr1y4.
Output for 5.3.24
upload/blznwul0s3.
Output for 5.3.23
upload/05ac0k0lq0.
Output for 5.3.22
upload/lqh656cch0.
Output for 5.3.21
upload/igtdpqqug0.
Output for 5.3.20
upload/4n9t7ip2lq.
Output for 5.3.19
upload/bhk947w33u.
Output for 5.3.18
upload/gmi3h9asyq.
Output for 5.3.17
upload/6wrev7v2o8.
Output for 5.3.16
upload/cvkn3cm4k9.
Output for 5.3.15
upload/ufd7yt63qm.
Output for 5.3.14
upload/qhb6tpj2m7.
Output for 5.3.13
upload/8bx0f2b5uo.
Output for 5.3.12
upload/v794ev0873.
Output for 5.3.11
upload/e5utiuheae.
Output for 5.3.10
upload/ir7i9k9hwd.
Output for 5.3.9
upload/qx4v60ur0r.
Output for 5.3.8
upload/t454n9pwmk.
Output for 5.3.7
upload/mwcgiyex6r.
Output for 5.3.6
upload/jkeqi1g3rr.
Output for 5.3.5
upload/l40agjujyk.
Output for 5.3.4
upload/c633gnq2fi.
Output for 5.3.3
upload/49tgd55fl0.
Output for 5.3.2
upload/z3r271w4b8.
Output for 5.3.1
upload/nghdi0vd80.
Output for 5.3.0
upload/gp4wjbhhs7.
Output for 5.2.17
upload/q8daqhoea6.
Output for 5.2.16
upload/sneascri61.
Output for 5.2.15
upload/bj2fh1crgy.
Output for 5.2.14
upload/a40ms80bvt.
Output for 5.2.13
upload/gxm0xkye01.
Output for 5.2.12
upload/g47kp1zmmx.
Output for 5.2.11
upload/tpslf8xdt3.
Output for 5.2.10
upload/tfyh03fjaf.
Output for 5.2.9
upload/iigkkz99wv.
Output for 5.2.8
upload/nrmsz2ixrs.
Output for 5.2.7
upload/b48rtt6kpk.
Output for 5.2.6
upload/7rhawum15z.
Output for 5.2.5
upload/620hwwehev.
Output for 5.2.4
upload/5ms868w29t.
Output for 5.2.3
upload/0de8b6v36v.
Output for 5.2.2
upload/srlx2xscv4.
Output for 5.2.1
upload/w8j98g8wnz.
Output for 5.2.0
upload/78wphkd7u5.
Output for 5.1.6
upload/p4pzzowtyf.
Output for 5.1.5
upload/8wft3cv8bg.
Output for 5.1.4
upload/77fcil7vk3.
Output for 5.1.3
upload/zkp7iw9m4w.
Output for 5.1.2
upload/gcz6vjyk97.
Output for 5.1.1
upload/uman3xov1n.
Output for 5.1.0
upload/6l39v50oda.
Output for 5.0.5
upload/x3zuzqmttu.
Output for 5.0.4
upload/ek7utio4e5.
Output for 5.0.3
upload/dm2qt3lq91.
Output for 5.0.2
upload/7lc9dwd7bg.
Output for 5.0.1
upload/2puhxcgle9.
Output for 5.0.0
upload/xw60xysyyp.
Output for 4.4.9
upload/us5gc9cyjt.
Output for 4.4.8
upload/jz3nqr94m2.
Output for 4.4.7
upload/av55svlk53.
Output for 4.4.6
upload/btgoap8p3k.
Output for 4.4.5
upload/vsxges60mr.
Output for 4.4.4
upload/qm9vpyuf2d.
Output for 4.4.3
upload/athpkgmd4g.
Output for 4.4.2
upload/oa3dm8zru6.
Output for 4.4.1
upload/5nys7f5f0c.
Output for 4.4.0
upload/pwvta4bxex.
Output for 4.3.11
upload/iine86m2rp.
Output for 4.3.10
upload/l4i9eb1amf.
Output for 4.3.9
upload/g0hu7zqd9f.
Output for 4.3.8
upload/rd7dibrz73.
Output for 4.3.7
upload/36ddz40y6h.
Output for 4.3.6
upload/20cej932p4.
Output for 4.3.5
upload/3kftnh9mnq.
Output for 4.3.4
upload/bccu2adt6z.
Output for 4.3.3
upload/hkpq1bj8r3.
Output for 4.3.2
upload/0sxekb7j1f.
Output for 4.3.0 - 4.3.1

Process exited with code 139.

preferences:
191.27 ms | 401 KiB | 224 Q