3v4l.org

run code in 200+ PHP versions simultaneously
<?php function createTempDir(): ?string { $separator = DIRECTORY_SEPARATOR; $path = rtrim(sys_get_temp_dir(), $separator) . $separator . mt_rand() . microtime(true); $createdTempDir = mkdir($path); if ($createdTempDir) { return $path; } return null; } var_dump(createTempDir());
based on g5Klm
Output for 7.4.0rc2
string(29) "/tmp/2078709521569575074.0005"
Output for 7.4.0rc1
string(29) "/tmp/9473345661569575074.0059"
Output for 7.4.0beta4
string(30) "/tmp/14222486761569575074.0004"
Output for 7.4.0beta2
string(29) "/tmp/8654670831569575074.0002"
Output for 7.4.0beta1
string(30) "/tmp/20124266221569575074.0003"
Output for 7.4.0alpha3
string(29) "/tmp/6418175621569575074.0003"
Output for 7.4.0alpha2
string(29) "/tmp/9999357211569575074.0042"
Output for 7.4.0alpha1
string(30) "/tmp/11209363021569575074.0006"
Output for 7.3.10
string(28) "/tmp/625533501569575074.0021"
Output for 7.3.9
string(30) "/tmp/13441884351569575074.0058"
Output for 7.3.8
string(29) "/tmp/1214067281569575074.0028"
Output for 7.3.7
string(30) "/tmp/11643772181569575074.0003"
Output for 7.3.6
string(30) "/tmp/11563140071569575074.0089"
Output for 7.3.5
string(29) "/tmp/2787235271569575074.0003"
Output for 7.3.4
string(30) "/tmp/17364690391569575074.0003"
Output for 7.3.3
string(30) "/tmp/16974210441569575074.0003"
Output for 7.3.2
string(30) "/tmp/15881959181569575074.0052"
Output for 7.3.1
string(30) "/tmp/18866782741569575074.0003"
Output for 7.3.0
string(30) "/tmp/18376355981569575074.0003"
Output for 7.2.22
string(29) "/tmp/8149217271569575074.0003"
Output for 7.2.21
string(29) "/tmp/7018849741569575074.0003"
Output for 7.2.20
string(29) "/tmp/8796513651569575074.0003"
Output for 7.2.19
string(29) "/tmp/1658045291569575074.0002"
Output for 7.2.18
string(29) "/tmp/3502024631569575074.0003"
Output for 7.2.17
string(30) "/tmp/16803553711569575074.0002"
Output for 7.2.16
string(29) "/tmp/7751529821569575074.0107"
Output for 7.2.15
string(30) "/tmp/12203355971569575074.0025"
Output for 7.2.14
string(30) "/tmp/18604907701569575074.0003"
Output for 7.2.13
string(30) "/tmp/20938984761569575074.0003"
Output for 7.2.12
string(30) "/tmp/20232607871569575074.0002"
Output for 7.2.11
string(29) "/tmp/9362643721569575074.0154"
Output for 7.2.10
string(29) "/tmp/4595291331569575074.0063"
Output for 7.2.9
string(30) "/tmp/16247033701569575074.0052"
Output for 7.2.8
string(30) "/tmp/21344107681569575074.0027"
Output for 7.2.7
string(29) "/tmp/8272269081569575074.0005"
Output for 7.2.6
string(29) "/tmp/6772498911569575074.0003"
Output for 7.2.5
string(30) "/tmp/18701558061569575074.0047"
Output for 7.2.4
string(30) "/tmp/19632086141569575074.0014"
Output for 7.2.3
string(30) "/tmp/12766194091569575074.0002"
Output for 7.2.2
string(29) "/tmp/9267821241569575074.0017"
Output for 7.2.1
string(29) "/tmp/6116813541569575074.0005"
Output for 7.2.0
string(30) "/tmp/16379275341569575074.0002"
Output for 7.1.32
string(30) "/tmp/12810259931569575074.0035"
Output for 7.1.31
string(29) "/tmp/1132199151569575074.0003"
Output for 7.1.30
string(29) "/tmp/4613431601569575074.0004"
Output for 7.1.29
string(30) "/tmp/10424257851569575074.0059"
Output for 7.1.28
string(29) "/tmp/4738246581569575074.0003"
Output for 7.1.27
string(29) "/tmp/8462573051569575074.0003"
Output for 7.1.26
string(30) "/tmp/16430997361569575074.0005"
Output for 7.1.25
string(30) "/tmp/13609569681569575074.0003"